fix: parsing return error only if nb philo == 0

This commit is contained in:
Camille Chauvet 2023-04-19 13:58:18 +00:00
parent 23e8774c44
commit 07a72c7f89

View File

@ -44,7 +44,7 @@ bool parsing(t_data *data, char **args, size_t n)
return (1); return (1);
} }
set_value(data, args, n); set_value(data, args, n);
if (data->nb_philos > 1) if (data->nb_philos == 0)
write(2, "Argument error !\n", 16); write(2, "Argument error !\n", 16);
return (data->nb_philos > 1); return (data->nb_philos == 0);
} }