From 369296693c0fe1d9e6c53273e54d53de77a0a076 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Wed, 14 Aug 2024 03:01:09 +0200 Subject: [PATCH] Avoid softlock if linker script contains a comment but no newline --- src/link/script.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/link/script.y b/src/link/script.y index b854a8c4..10e6fdc2 100644 --- a/src/link/script.y +++ b/src/link/script.y @@ -241,7 +241,7 @@ yy::parser::symbol_type yylex() { } // Then, skip a comment if applicable. if (c == ';') { - while (!isNewline(c)) { + while (c != EOF && !isNewline(c)) { c = context.file.sbumpc(); } }