[Scummvm-git-logs] scummvm master -> ac5f61265f9101a29a4fa87177036ff39e68ecaa

sev- sev at scummvm.org
Fri May 25 20:13:18 CEST 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ac5f61265f COMMON: fix wrong size assignment in HashMap


Commit: ac5f61265f9101a29a4fa87177036ff39e68ecaa
    https://github.com/scummvm/scummvm/commit/ac5f61265f9101a29a4fa87177036ff39e68ecaa
Author: whiterandrek (whiterandrek at gmail.com)
Date: 2018-05-25T19:13:14+01:00

Commit Message:
COMMON: fix wrong size assignment in HashMap

Changed paths:
    common/hashmap.h


diff --git a/common/hashmap.h b/common/hashmap.h
index 56e80b8..1f93b68 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 *));





More information about the Scummvm-git-logs mailing list