diff options
Diffstat (limited to 'table.c')
-rw-r--r-- | table.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -165,7 +165,7 @@ void * remove_table_index(struct table *tbl, struct string name) { tbl->len--; void *tmp = realloc(tbl->array, sizeof(*(tbl->array)) * tbl->len); - if (tmp) + if (tmp || (tbl->len == 0)) tbl->array = tmp; // else: realloc failed on shrinking... so now we have a table that's allocated a bit too big, not much of an issue |