diff --git a/src/sfxd.c b/src/sfxd.c index e0382f1..82b0cf6 100644 --- a/src/sfxd.c +++ b/src/sfxd.c @@ -388,8 +388,7 @@ void sfx_pool_grow(int size) { struct sfx_pool_item *sfx_pool_lookup(const char *key) { if (key == NULL) return NULL; uint32_t hash = adler32(key, strlen(key)); - for (int offset = 0; offset < sounds_pool.cap; offset++) { - int index = (hash + offset) % sounds_pool.cap; + FOR_OFFSET_PROBE (hash, offset, index, sounds_pool.cap) { if (0 == strncmp(key, sounds_pool.sounds[index].key, KEY_LENGTH)) { #ifndef NO_COUNTERS global_counters.pool_read++;