Fix infinite loop bug in linked list find function.

This commit is contained in:
Danila Fedorin 2016-12-25 00:28:29 -08:00
parent 4fa9ab13ee
commit 4c7f0ee0e5

View File

@ -69,6 +69,7 @@ void* ll_find(ll* ll, void* data, compare_func compare) {
if (compare(data, head->data)) { if (compare(data, head->data)) {
to_return = head->data; to_return = head->data;
} }
head = head->next;
} }
return to_return; return to_return;
} }