diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2011-12-26 23:39:48 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2011-12-26 23:39:48 +0200 |
commit | 73d24cae0db6cc817db209e5e1ea93b0733d1cca (patch) | |
tree | dcb46bac28312a06162f390bfd0b90cd5e07d974 /int_array.c | |
parent | 14828f8fd6f90f711d832f2c4d7120db4bef3770 (diff) | |
download | egawk-73d24cae0db6cc817db209e5e1ea93b0733d1cca.tar.gz egawk-73d24cae0db6cc817db209e5e1ea93b0733d1cca.tar.bz2 egawk-73d24cae0db6cc817db209e5e1ea93b0733d1cca.zip |
The grand merge: dgawk and pgawk folded into gawk.
Diffstat (limited to 'int_array.c')
-rw-r--r-- | int_array.c | 6 |
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)) |