diff --git a/src/asm/section.c b/src/asm/section.c index 3be3eb8f..ce3b66b0 100644 --- a/src/asm/section.c +++ b/src/asm/section.c @@ -181,6 +181,8 @@ static void setSection(struct Section *pSect) pPCSymbol->pSection = pSect; pPCSymbol->isConstant = pSect && pSect->nOrg != -1; + + sym_SetCurrentSymbolScope(NULL); } /* @@ -224,7 +226,6 @@ void out_EndLoadSection(void) if (!currentLoadSection) yyerror("Found `ENDL` outside of a `LOAD` block"); currentLoadSection = NULL; - sym_SetCurrentSymbolScope(NULL); nPC = pCurrentSection->nPC; setSection(pCurrentSection);