Fix bug with OAHashMap corruption on insertion

When an item has been inserted into an already-occupied slot, and
the original inhabitant of that slot was moved on, it was wrongly
moved with the inserted-item's key/value instead of its own.

This closes #22928.
This commit is contained in:
Florian Jung 2018-10-11 12:53:32 +02:00
parent 15d3c96afd
commit 0353182e7b
1 changed files with 2 additions and 2 deletions

View File

@ -125,7 +125,7 @@ private:
while (42) {
if (hashes[pos] == EMPTY_HASH) {
_construct(pos, hash, p_key, p_value);
_construct(pos, hash, key, value);
return;
}
@ -136,7 +136,7 @@ private:
if (hashes[pos] & DELETED_HASH_BIT) {
// we found a place where we can fit in!
_construct(pos, hash, p_key, p_value);
_construct(pos, hash, key, value);
return;
}