From 2383977fceb725d178b43616f19137656382508f Mon Sep 17 00:00:00 2001 From: whiterandrek Date: Thu, 24 May 2018 22:28:46 +0300 Subject: [PATCH] COMMON: fix wrong size assignment in HashMap --- common/hashmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/hashmap.h b/common/hashmap.h index 56e80b89aa9d..1f93b68455ab 100644 --- a/common/hashmap.h +++ b/common/hashmap.h @@ -406,7 +406,7 @@ void HashMap::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 *));