Reset symbol scope on every section change

This commit is contained in:
ISSOtm
2020-03-20 17:59:47 +01:00
parent fb5e768142
commit deb91f679d

View File

@@ -181,6 +181,8 @@ static void setSection(struct Section *pSect)
pPCSymbol->pSection = pSect; pPCSymbol->pSection = pSect;
pPCSymbol->isConstant = pSect && pSect->nOrg != -1; pPCSymbol->isConstant = pSect && pSect->nOrg != -1;
sym_SetCurrentSymbolScope(NULL);
} }
/* /*
@@ -224,7 +226,6 @@ void out_EndLoadSection(void)
if (!currentLoadSection) if (!currentLoadSection)
yyerror("Found `ENDL` outside of a `LOAD` block"); yyerror("Found `ENDL` outside of a `LOAD` block");
currentLoadSection = NULL; currentLoadSection = NULL;
sym_SetCurrentSymbolScope(NULL);
nPC = pCurrentSection->nPC; nPC = pCurrentSection->nPC;
setSection(pCurrentSection); setSection(pCurrentSection);