From 4c7f0ee0e546bc7c75cf23fb1ed35e43f0021a8e Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Sun, 25 Dec 2016 00:28:29 -0800 Subject: [PATCH] Fix infinite loop bug in linked list find function. --- src/ll.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ll.c b/src/ll.c index 48e3def..bbb0da1 100644 --- a/src/ll.c +++ b/src/ll.c @@ -69,6 +69,7 @@ void* ll_find(ll* ll, void* data, compare_func compare) { if (compare(data, head->data)) { to_return = head->data; } + head = head->next; } return to_return; }