diff --git a/include/ck_bag.h b/include/ck_bag.h index 590ca31..3c7fa81 100644 --- a/include/ck_bag.h +++ b/include/ck_bag.h @@ -146,6 +146,7 @@ ck_bag_iterator_init(ck_bag_iterator_t *iterator, ck_bag_t *bag) iterator->block = ck_pr_load_ptr(&bag->head); iterator->index = 0; + iterator->n_entries = 0; if (iterator->block != NULL) iterator->n_entries = ck_bag_block_count(iterator->block);