From deb91f679dfdf06811badd5f3a28ef44549bf170 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Fri, 20 Mar 2020 17:59:47 +0100 Subject: [PATCH] Reset symbol scope on every section change --- src/asm/section.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);