Util: Fix inserting too many items into a hash table

This commit is contained in:
Jeffrey Pfau 2016-09-19 15:01:58 -07:00
parent aaf12cad27
commit 37ddf7020b
2 changed files with 2 additions and 0 deletions

View File

@ -43,6 +43,7 @@ Bugfixes:
- GBA: Count up timers should not count themselves - GBA: Count up timers should not count themselves
- GBA Savedata: Fix savedata sync timer - GBA Savedata: Fix savedata sync timer
- GBA Savedata: Only unmap savedata if present - GBA Savedata: Only unmap savedata if present
- Util: Fix inserting too many items into a hash table
Misc: Misc:
- 3DS: Use blip_add_delta_fast for a small speed improvement - 3DS: Use blip_add_delta_fast for a small speed improvement
- OpenGL: Log shader compilation failure - OpenGL: Log shader compilation failure

View File

@ -175,6 +175,7 @@ void HashTableInsert(struct Table* table, const char* key, void* value) {
} }
return; return;
} TABLE_LOOKUP_END; } TABLE_LOOKUP_END;
list = _resizeAsNeeded(table, list, hash);
list->list[list->nEntries].key = hash; list->list[list->nEntries].key = hash;
list->list[list->nEntries].stringKey = strdup(key); list->list[list->nEntries].stringKey = strdup(key);
list->list[list->nEntries].keylen = strlen(key); list->list[list->nEntries].keylen = strlen(key);