summaryrefslogtreecommitdiff
path: root/int_array.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2011-12-26 23:39:48 +0200
committerArnold D. Robbins <arnold@skeeve.com>2011-12-26 23:39:48 +0200
commit73d24cae0db6cc817db209e5e1ea93b0733d1cca (patch)
treedcb46bac28312a06162f390bfd0b90cd5e07d974 /int_array.c
parent14828f8fd6f90f711d832f2c4d7120db4bef3770 (diff)
downloadgawk-73d24cae0db6cc817db209e5e1ea93b0733d1cca.tar.gz
The grand merge: dgawk and pgawk folded into gawk.
Diffstat (limited to 'int_array.c')
-rw-r--r--int_array.c6
1 files changed, 4 insertions, 2 deletions
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))