mirror of
https://github.com/DavidGailleton/42-Push_Swap.git
synced 2026-01-27 00:41:57 +00:00
fix my mistakes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user