Fix bug in HashMap that would allow iterating over deleted values.

This commit is contained in:
Jordan Bancino 2023-02-11 00:15:49 +00:00
parent 27c4713e5d
commit 2443c91bba

View file

@ -266,7 +266,7 @@ HashMapIterate(HashMap * map, char **key, void **value)
map->iterator++;
if (bucket)
if (bucket && bucket->hash)
{
*key = bucket->key;
*value = bucket->value;