From: Dominik Kaiser Date: Sat, 13 Apr 2024 12:59:17 +0000 (+0200) Subject: Fix input handling X-Git-Url: https://git.dkaiser.de/?a=commitdiff_plain;h=8d2fe088d72dfebfc96e7bd9b1eae9b3e02f804a;p=42%2Fpush_swap.git Fix input handling Before the fix, the last element was ignored while checking for duplicates. Now all elements are checked and input handling should be working fine. --- diff --git a/input_handling.c b/input_handling.c index 93e37f6..7699671 100644 --- a/input_handling.c +++ b/input_handling.c @@ -6,7 +6,7 @@ /* By: dkaiser next) { cmp_elem = stack->next; - while (cmp_elem->next) + while (cmp_elem) { if (*(int *)stack->content == *(int *)cmp_elem->content) return (0);