From 73d24cae0db6cc817db209e5e1ea93b0733d1cca Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 26 Dec 2011 23:39:48 +0200 Subject: The grand merge: dgawk and pgawk folded into gawk. --- int_array.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'int_array.c') diff --git a/int_array.c b/int_array.c index fd58de26..200431f9 100644 --- a/int_array.c +++ b/int_array.c @@ -290,7 +290,8 @@ int_remove(NODE *symbol, NODE *subs) int i; NODE *xn = symbol->xarray; - assert(symbol->buckets != NULL); + if (symbol->table_size == 0 || symbol->buckets == NULL) + return NULL; if (! is_integer(symbol, subs)) { if (xn == NULL || xn->aremove(xn, subs) == NULL) @@ -462,7 +463,8 @@ int_list(NODE *symbol, NODE *t) long num; static char buf[100]; - assert(symbol->table_size > 0); + if (symbol->table_size == 0) + return NULL; num_elems = symbol->table_size; if ((t->flags & (AINDEX|AVALUE|ADELETE)) == (AINDEX|ADELETE)) -- cgit v1.2.3