mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-01 07:46:11 +00:00
COMMON: fix wrong size assignment in HashMap
This commit is contained in:
parent
cee4d6b853
commit
ac5f61265f
@ -406,7 +406,7 @@ void HashMap<Key, Val, HashFunc, EqualFunc>::clear(bool shrinkArray) {
|
||||
if (shrinkArray && _mask >= HASHMAP_MIN_CAPACITY) {
|
||||
delete[] _storage;
|
||||
|
||||
_mask = HASHMAP_MIN_CAPACITY;
|
||||
_mask = HASHMAP_MIN_CAPACITY - 1;
|
||||
_storage = new Node *[HASHMAP_MIN_CAPACITY];
|
||||
assert(_storage != nullptr);
|
||||
memset(_storage, 0, HASHMAP_MIN_CAPACITY * sizeof(Node *));
|
||||
|
Loading…
x
Reference in New Issue
Block a user