diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-07-01 10:08:07 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-07-01 10:08:07 +0300 |
commit | ab0f063ac9318bc08c6a50c25dd6adec922f9476 (patch) | |
tree | 84209b8bce619039a9495fd27cc15ba9824f91f9 /symbol.c | |
parent | 17fde7572b0a1661dac6e77f74a74220b34da555 (diff) | |
parent | ce41ffb80b068139b4e04e3cff1d5dc2ee0ccc78 (diff) | |
download | egawk-ab0f063ac9318bc08c6a50c25dd6adec922f9476.tar.gz egawk-ab0f063ac9318bc08c6a50c25dd6adec922f9476.tar.bz2 egawk-ab0f063ac9318bc08c6a50c25dd6adec922f9476.zip |
Merge branch 'master' into feature/cmake
Diffstat (limited to 'symbol.c')
-rw-r--r-- | symbol.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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); |