From 0353182e7ba925d3a162decb6f2327fec95764e2 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Thu, 11 Oct 2018 12:53:32 +0200 Subject: [PATCH] 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. --- core/oa_hash_map.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/oa_hash_map.h b/core/oa_hash_map.h index 3705762d6cb..98404425192 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; }