aboutsummaryrefslogtreecommitdiffstats
path: root/symbol.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-07-01 10:09:25 +0300
committerArnold D. Robbins <arnold@skeeve.com>2016-07-01 10:09:25 +0300
commitd8de6a38b2e4f2481a3c72477495f7a2b79da743 (patch)
treec10fbd3af1c1a31b8a5aba5827566f31223430bf /symbol.c
parenta4cbdf37b98a56f688f8e1be96666a6f109c0e38 (diff)
parentce41ffb80b068139b4e04e3cff1d5dc2ee0ccc78 (diff)
downloadegawk-d8de6a38b2e4f2481a3c72477495f7a2b79da743.tar.gz
egawk-d8de6a38b2e4f2481a3c72477495f7a2b79da743.tar.bz2
egawk-d8de6a38b2e4f2481a3c72477495f7a2b79da743.zip
Merge branch 'master' into feature/fixtype
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 ab231038..aab0c470 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);