diff options
author | Jinghua Luo <sunmoon1997@gmail.com> | 2007-02-04 00:51:53 +0800 |
---|---|---|
committer | Jinghua Luo <sunmoon1997@gmail.com> | 2007-02-04 00:51:53 +0800 |
commit | 7bfa02a064762eef2aa321ca0da51b6ebc0f9090 (patch) | |
tree | 706e8f59772d0e758198e640e048e2b073ee68bb | |
parent | e71e18043588689c0a92a747347e1745ae5969ab (diff) |
hash: fix a bug in itering code.
hash foreach will leak the dead entry to user this may lead badness to happen.
-rw-r--r-- | src/hash.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -295,7 +295,7 @@ sdl_freetype_hash_foreach (sdl_freetype_hash_t * hash, hash->itering++; for (i = 0; i < hash->size; i++) { - if (!hash->entries[i]) + if (!hash->entries[i] || hash->entries[i] == &dead_entry) continue; func (hash, hash->entries[i], closure); } |