From 07a72c7f894311f0b8befcf240944fb6feee4bd9 Mon Sep 17 00:00:00 2001 From: Camille Chauvet Date: Wed, 19 Apr 2023 13:58:18 +0000 Subject: [PATCH] fix: parsing return error only if nb philo == 0 --- parsing.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parsing.c b/parsing.c index 558c027..c6c7267 100644 --- a/parsing.c +++ b/parsing.c @@ -44,7 +44,7 @@ bool parsing(t_data *data, char **args, size_t n) return (1); } set_value(data, args, n); - if (data->nb_philos > 1) + if (data->nb_philos == 0) write(2, "Argument error !\n", 16); - return (data->nb_philos > 1); + return (data->nb_philos == 0); }