diff --git a/array.c b/array.c index aa52f3a..8a252cc 100644 --- a/array.c +++ b/array.c @@ -618,6 +618,9 @@ do_delete(NODE *symbol, int nsubs) (void) assoc_remove(symbol, subs); DEREF(subs); + if (symbol->table_size == 0) + /* last element was removed, so reset array type to null */ + null_array(symbol); #undef free_subs }