diff --git a/srcs/ft_isnumber.c b/srcs/ft_isnumber.c index 6ecc6c5..0238943 100644 --- a/srcs/ft_isnumber.c +++ b/srcs/ft_isnumber.c @@ -8,6 +8,8 @@ int ft_isnumber(char *nb) i = 0; if (nb[i] == '+' || nb[i] == '-') i++; + if (nb[i] == '\0') + return (0); while (nb[i] != '\0') { if (ft_isdigit(nb[i]) == 0)