Skip to content

Commit f37a569

Browse files
committed
fix error
1 parent 92914bb commit f37a569

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

st.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,8 @@ st_update(st_table *table, st_data_t key, int (*func)(st_data_t key, st_data_t *
832832
return 0;
833833
}
834834

835-
FIND_ENTRY(table, ptr, hash_val, bin_pos);
835+
bin_pos = hash_val % table->num_bins;
836+
ptr = find_entry(table, key, hash_val, bin_pos);
836837

837838
if (ptr == 0) {
838839
return 0;

0 commit comments

Comments
 (0)