From e5793d2251ff04348672c1f5363e24c7535ead16 Mon Sep 17 00:00:00 2001 From: hugogogo Date: Sat, 14 May 2022 15:27:34 +0200 Subject: [PATCH] modif un isnumber --- srcs/ft_isnumber.c | 2 ++ 1 file changed, 2 insertions(+) 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)