Skip to content

Commit 061c84f

Browse files
committed
Fix index_pop to use hashes array since objects may have been gc'd
1 parent de892f9 commit 061c84f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

input/bsv/uint32s_index.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ void uint32s_index_pop(uint32s_index_t *index)
263263
uint32_t idx = RBUF_LEN(index->objects)-1;
264264
uint32_t *object = RBUF_POP(index->objects);
265265
size_t size_bytes = index->object_size * sizeof(uint32_t);
266-
uint32_t hash = uint32s_hash_bytes((uint8_t *)object, size_bytes);
266+
uint32_t hash = index->hashes[idx];
267267
struct uint32s_bucket *bucket = RHMAP_PTR(index->index, hash);
268268
RBUF_RESIZE(index->counts, idx);
269269
RBUF_RESIZE(index->hashes, idx);

0 commit comments

Comments
 (0)