aboutsummaryrefslogtreecommitdiffstats
path: root/symbol.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-07-01 10:06:02 +0300
committerArnold D. Robbins <arnold@skeeve.com>2016-07-01 10:06:02 +0300
commit7832eb7eb92baebf12838fd6eae24be58bd6ba27 (patch)
tree870a5e211dd0eeac0d4821d2fed30b23eed07b83 /symbol.c
parente8a8d49954bb50b2b67a88382e80fe63e738cd3f (diff)
parent72645295eec48c30ed6a9b9f8bf21b9f53995524 (diff)
downloadegawk-7832eb7eb92baebf12838fd6eae24be58bd6ba27.tar.gz
egawk-7832eb7eb92baebf12838fd6eae24be58bd6ba27.tar.bz2
egawk-7832eb7eb92baebf12838fd6eae24be58bd6ba27.zip
Merge branch 'gawk-4.1-stable'
Diffstat (limited to 'symbol.c')
-rw-r--r--symbol.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/symbol.c b/symbol.c
index 8533fad6..fe7e3753 100644
--- a/symbol.c
+++ b/symbol.c
@@ -409,7 +409,8 @@ get_symbols(SYMBOL_TYPE what, bool sort)
max = the_table->table_size * 2;
list = assoc_list(the_table, "@unsorted", ASORTI);
- emalloc(table, NODE **, (var_count + 1) * sizeof(NODE *), "get_symbols");
+ /* add three: one for FUNCTAB, one for SYMTAB, and one for a final NULL */
+ emalloc(table, NODE **, (var_count + 1 + 1 + 1) * sizeof(NODE *), "get_symbols");
for (i = count = 0; i < max; i += 2) {
r = list[i+1];
@@ -417,6 +418,9 @@ get_symbols(SYMBOL_TYPE what, bool sort)
continue;
table[count++] = r;
}
+
+ table[count++] = func_table;
+ table[count++] = symbol_table;
}
efree(list);