Skip to content
Prev Previous commit
Next Next commit
fix error
  • Loading branch information
funny-falcon committed Dec 31, 2011
commit f37a5695324a2631054585fec79eaaf5ce6e3b35
3 changes: 2 additions & 1 deletion st.c
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,8 @@ st_update(st_table *table, st_data_t key, int (*func)(st_data_t key, st_data_t *
return 0;
}

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

if (ptr == 0) {
return 0;
Expand Down