diff --git a/ds/dict.c b/ds/dict.c index d6fa628..7f5f0e2 100644 --- a/ds/dict.c +++ b/ds/dict.c @@ -495,6 +495,7 @@ static b_iterator *iterable_begin(b_dict *dict) if (dict_is_empty(it->_d_p)) { it->item.key = NULL; it->item.value = NULL; + b_iterator_set_status(it_obj, B_ERR_NO_DATA); return it_obj; } @@ -504,6 +505,7 @@ static b_iterator *iterable_begin(b_dict *dict) if (!first_bucket) { it->item.key = NULL; it->item.value = NULL; + b_iterator_set_status(it_obj, B_ERR_NO_DATA); return it_obj; } @@ -513,6 +515,7 @@ static b_iterator *iterable_begin(b_dict *dict) if (!first_item) { it->item.key = NULL; it->item.value = NULL; + b_iterator_set_status(it_obj, B_ERR_NO_DATA); return it_obj; }