aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/hashmap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/hashmap.h b/common/hashmap.h
index 56e80b89aa..1f93b68455 100644
--- a/common/hashmap.h
+++ b/common/hashmap.h
@@ -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 *));