fix my mistakes

This commit is contained in:
Maoake Teriierooiterai
2026-01-13 12:21:15 +01:00
parent 7d2fed6e76
commit b2f9912963
14 changed files with 2 additions and 334 deletions

View File

@@ -18,7 +18,7 @@ int verif_is_number(char **tab)
int len;
len = len_split(tab);
if (tab[len - 1][0] == '-')
if (tab[len - 1][0] == '-' && !ft_isdigit(tab[len - 1][1]))
return (0);
return (1);
}

View File

@@ -28,7 +28,7 @@ static int verif_atoi(const char *nptr)
i = 0;
tmp = 0;
before = 0;
if (ft_strncmp("-2147483648", nptr, 15))
if (ft_strncmp(nptr, "-2147483648", 15))
return (1);
while ((nptr[i] >= 9 && nptr[i] <= 13) || nptr[i] == ' ')
i++;