fixing the parsing

This commit is contained in:
Maoake Teriierooiterai
2026-01-12 14:00:08 +01:00
parent ccccc3b640
commit 97ce3bf40b
6 changed files with 34 additions and 7 deletions

View File

@@ -11,6 +11,17 @@
/* ************************************************************************** */
#include "check_error.h"
#include "parsing.h"
int verif_is_number(char **tab)
{
int len;
len = len_split(tab);
if (tab[len - 1][0] == '-')
return (0);
return (1);
}
int check_error(char **tab, int mod)
{
@@ -22,5 +33,7 @@ int check_error(char **tab, int mod)
return (0);
if (!verif_double(tab, mod))
return (0);
if (!verif_is_number(tab))
return (0);
return (1);
}