diff --git a/src/cc65/symtab.c b/src/cc65/symtab.c index 191daddad..1f63e9430 100644 --- a/src/cc65/symtab.c +++ b/src/cc65/symtab.c @@ -268,7 +268,9 @@ void EnterFunctionLevel (void) TagTab = S; /* Create and assign a new label table */ - LabelTab = NewSymTable (SYMTAB_SIZE_LABEL); + S = NewSymTable (SYMTAB_SIZE_LABEL); + S->PrevTab = LabelTab; + LabelTab = S; } @@ -286,6 +288,7 @@ void RememberFunctionLevel (struct FuncDesc* F) /* Don't delete the tables */ SymTab = SymTab->PrevTab; TagTab = TagTab->PrevTab; + LabelTab = LabelTab->PrevTab; }