diff options
Diffstat (limited to 'symbol.c')
-rw-r--r-- | symbol.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -38,6 +38,10 @@ getsym(Rune *name, int fresh) done = 1; }while(!done && !fresh); + /* make sure to allocate in the most local scope if the symbol is not found */ + if(currentdfn) + tab = currentdfn->symtab; + tab->nsyms++; tab->syms = realloc(tab->syms, sizeof(Symbol *) * tab->nsyms); tab->syms[tab->nsyms-1] = emalloc(sizeof(Symbol)); |