fixed a bug in the hash where the first entry was never used in an iterator
This commit is contained in:
@@ -217,7 +217,7 @@ hash_iterator_t *hash_iter_new(hash_t *table)
|
|||||||
iter->ref = 1;
|
iter->ref = 1;
|
||||||
iter->table = hash_clone(table);
|
iter->table = hash_clone(table);
|
||||||
iter->entry = NULL;
|
iter->entry = NULL;
|
||||||
iter->index = 0;
|
iter->index = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return iter;
|
return iter;
|
||||||
|
|||||||
Reference in New Issue
Block a user