diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-07-01 10:06:02 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-07-01 10:06:02 +0300 |
commit | 7832eb7eb92baebf12838fd6eae24be58bd6ba27 (patch) | |
tree | 870a5e211dd0eeac0d4821d2fed30b23eed07b83 /symbol.c | |
parent | e8a8d49954bb50b2b67a88382e80fe63e738cd3f (diff) | |
parent | 72645295eec48c30ed6a9b9f8bf21b9f53995524 (diff) | |
download | egawk-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.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); |