diff --git a/ft_itoa.c b/ft_itoa.c index 8b9f77d..97ba2a2 100644 --- a/ft_itoa.c +++ b/ft_itoa.c @@ -6,7 +6,7 @@ /* By: tmaze +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2018/04/08 11:20:12 by tmaze #+# #+# */ -/* Updated: 2018/04/08 12:45:55 by tmaze ### ########.fr */ +/* Updated: 2018/04/08 16:57:47 by tmaze ### ########.fr */ /* */ /* ************************************************************************** */ @@ -31,7 +31,7 @@ char *ft_itoa(int n) nb_nbr = 1; nbr = ft_abs(n); sign = (n < 0); - while (mult < nbr && (nb_nbr++)) + while (mult <= nbr && (nb_nbr++)) mult *= 10; nb_nbr += sign; if ((ret = ft_strnew(nb_nbr)) == NULL)