summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-01-14 12:45:22 -0500
committerDavid Robillard <d@drobilla.net>2022-01-14 12:45:22 -0500
commit335fe063ea9b98d8d94cb60e63a08eeb5303f0d8 (patch)
treee68803c04684f36aab801378c54785134811355b /src
parent6e797163bb07163026c77d9d328dee9e41f3a54f (diff)
downloadzix-335fe063ea9b98d8d94cb60e63a08eeb5303f0d8.tar.gz
zix-335fe063ea9b98d8d94cb60e63a08eeb5303f0d8.tar.bz2
zix-335fe063ea9b98d8d94cb60e63a08eeb5303f0d8.zip
Fix hash insertion tombstone replacement case
Diffstat (limited to 'src')
-rw-r--r--src/hash.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/hash.c b/src/hash.c
index ab916d0..f0f2fe9 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -272,6 +272,7 @@ zix_hash_plan_insert_prehashed(const ZixHash* const hash,
if (!found_tombstone && !hash->entries[pos.index].value) {
assert(hash->entries[pos.index].hash == tombstone);
first_tombstone = pos.index; // Remember the first/best free index
+ found_tombstone = true;
}
pos.index = next_index(hash, pos.index);