diff --git a/st.c b/st.c index 976bcf4648..a465de4ae5 100644 --- a/st.c +++ b/st.c @@ -1197,6 +1197,8 @@ st_insert2(st_table *tab, st_data_t key, st_data_t value, if (tab->bins == NULL) { bin = find_entry(tab, hash_value, key); new_p = bin == UNDEFINED_ENTRY_IND; + if (new_p) + tab->num_entries++; bin_ind = UNDEFINED_BIN_IND; } else {