fix: parsing return error only if nb philo == 0
This commit is contained in:
parent
23e8774c44
commit
07a72c7f89
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user