modif un isnumber
This commit is contained in:
@@ -8,6 +8,8 @@ int ft_isnumber(char *nb)
|
|||||||
i = 0;
|
i = 0;
|
||||||
if (nb[i] == '+' || nb[i] == '-')
|
if (nb[i] == '+' || nb[i] == '-')
|
||||||
i++;
|
i++;
|
||||||
|
if (nb[i] == '\0')
|
||||||
|
return (0);
|
||||||
while (nb[i] != '\0')
|
while (nb[i] != '\0')
|
||||||
{
|
{
|
||||||
if (ft_isdigit(nb[i]) == 0)
|
if (ft_isdigit(nb[i]) == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user