diff --git a/src/asm/symbol.c b/src/asm/symbol.c index 167355ba..c7f187fc 100644 --- a/src/asm/symbol.c +++ b/src/asm/symbol.c @@ -540,8 +540,10 @@ void sym_AddReloc(char const *tzSym) char *localPtr = strchr(tzSym, '.'); if (localPtr != NULL) { - if (!pScope) - fatalerror("Local label in main scope"); + if (!pScope) { + yyerror("Local label in main scope"); + return; + } struct sSymbol *parent = pScope->pScope ? pScope->pScope : pScope; diff --git a/test/asm/local-without-parent.err b/test/asm/local-without-parent.err index 85a4a724..71b4230c 100644 --- a/test/asm/local-without-parent.err +++ b/test/asm/local-without-parent.err @@ -1,2 +1,3 @@ ERROR: local-without-parent.asm(2): Local label '.test' in main scope +error: Assembly aborted (1 errors)!