From f744fff84de254aae6cbcafa13f4c6c12f21e6b9 Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Thu, 8 Nov 2018 13:15:11 +0000 Subject: [PATCH] Fix: Corrected igloo_list_iterator_next()'s reference counting --- src/list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/list.c b/src/list.c index f528e11..c76cd8b 100644 --- a/src/list.c +++ b/src/list.c @@ -294,7 +294,7 @@ igloo_ro_t igloo_list_iterator_next(igloo_list_iterator_t *iterator if (physical >= iterator->list->fill) return igloo_RO_NULL; - if (igloo_ro_unref(iterator->list->elements[physical]) == 0) + if (igloo_ro_ref(iterator->list->elements[physical]) != 0) return igloo_RO_NULL; iterator->idx++;