aboutsummaryrefslogtreecommitdiffstats
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/array.c b/array.c
index d8fbab33..a47660c8 100644
--- a/array.c
+++ b/array.c
@@ -608,6 +608,9 @@ do_delete(NODE *symbol, int nsubs)
(void) assoc_remove(symbol, subs);
DEREF(subs);
+ if (assoc_empty(symbol))
+ /* last element was removed, so reset array type to null */
+ null_array(symbol);
#undef free_subs
}