summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Jung <florian.jung@fau.de>2018-10-11 12:53:32 +0200
committerFlorian Jung <florian.jung@fau.de>2018-10-11 12:53:32 +0200
commit0353182e7ba925d3a162decb6f2327fec95764e2 (patch)
tree25fedfb4d86a38c7d88364eb4652da1491eaef9b
parent15d3c96afdbb73505f128c5d3a6393ed24140c67 (diff)
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.
-rw-r--r--core/oa_hash_map.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/oa_hash_map.h b/core/oa_hash_map.h
index 3705762d6c..9840442519 100644
--- a/core/oa_hash_map.h
+++ b/core/oa_hash_map.h
@@ -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;
}