From ac5f61265f9101a29a4fa87177036ff39e68ecaa Mon Sep 17 00:00:00 2001 From: whiterandrek Date: Thu, 24 May 2018 22:28:46 +0300 Subject: COMMON: fix wrong size assignment in HashMap --- common/hashmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/hashmap.h') 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::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 *)); -- cgit v1.2.3