From 861cb552c4edb52f1ed87ea5fab39f863526cb43 Mon Sep 17 00:00:00 2001 From: Rangi Date: Fri, 11 Dec 2020 19:23:49 -0500 Subject: [PATCH] discardBlockComment sets lexerState->disableMacroArgs = true, like discardComment --- src/asm/lexer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/asm/lexer.c b/src/asm/lexer.c index 08404b55..d5081adb 100644 --- a/src/asm/lexer.c +++ b/src/asm/lexer.c @@ -926,11 +926,12 @@ void lexer_DumpStringExpansions(void) static void discardBlockComment(void) { dbgPrint("Discarding block comment\n"); + lexerState->disableMacroArgs = true; for (;;) { switch (nextChar()) { case EOF: error("Unterminated block comment\n"); - return; + goto finish; case '/': if (peek(0) == '*') { warning(WARNING_NESTED_COMMENT, @@ -940,13 +941,15 @@ static void discardBlockComment(void) case '*': if (peek(0) == '/') { shiftChars(1); - return; + goto finish; } /* fallthrough */ default: continue; } } +finish: + lexerState->disableMacroArgs = false; } /* Function to discard all of a line's comments */