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:
parent
15d3c96afd
commit
0353182e7b
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue