Skip to content

Commit c7b07a8

Browse files
committed
Fix docs intersection bug #4
1 parent 98bb074 commit c7b07a8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ds/ds_htable.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,7 @@ void ds_htable_ensure_capacity(ds_htable_t *table, uint32_t capacity)
607607
static void ds_htable_put_next(ds_htable_t *table, ds_htable_bucket_t *bucket)
608608
{
609609
DS_HTABLE_BUCKET_COPY(&table->buckets[table->next], bucket);
610+
DS_HTABLE_BUCKET_REHASH(table, bucket, table->capacity - 1, table->next);
610611

611612
table->next++;
612613
table->size++;
@@ -1064,6 +1065,7 @@ ds_htable_t *ds_htable_diff(ds_htable_t *table, ds_htable_t *other)
10641065
ds_htable_t *ds_htable_intersect(ds_htable_t *table, ds_htable_t *other)
10651066
{
10661067
ds_htable_bucket_t *bucket;
1068+
10671069
ds_htable_t *intersection = ds_htable();
10681070

10691071
DS_HTABLE_FOREACH_BUCKET(table, bucket) {

0 commit comments

Comments
 (0)