From: Lukas Jiriste Date: Thu, 28 Mar 2024 10:54:47 +0000 (+0100) Subject: Fix logic bug X-Git-Url: https://git.ljiriste.work/?a=commitdiff_plain;h=026f67c0b6bf8e52b806baa5c225528442aa94d3;p=42%2Fphilosophers.git Fix logic bug --- diff --git a/philo/parsing_misc.c b/philo/parsing_misc.c index 569b146..747648a 100644 --- a/philo/parsing_misc.c +++ b/philo/parsing_misc.c @@ -6,7 +6,7 @@ /* By: ljiriste +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/03/26 10:42:02 by ljiriste #+# #+# */ -/* Updated: 2024/03/28 11:28:12 by ljiriste ### ########.fr */ +/* Updated: 2024/03/28 11:53:49 by ljiriste ### ########.fr */ /* */ /* ************************************************************************** */ @@ -71,5 +71,5 @@ int same_number(const char *num1, const char *num2) ++num1; ++num2; } - return ((int)*num1 - (int)*num2); + return (!((int)*num1 - (int)*num2)); }