From 38aabb23b4332abdbf07a8d88744d66330afcb68 Mon Sep 17 00:00:00 2001 From: Joachim Henze Date: Sun, 9 Oct 2022 19:51:46 +0200 Subject: [PATCH] [0.4.13][CMD] Quick fix for the REM command parser. CORE-17030 This avoids spamming "Syntax Errors" to the cmd-prompt when starting the VS2010 command prompt. Or when typing something like "@Rem Hello" at the prompt. Fix picked from 0.4.15-dev-202-g 9c11be5a3a95a35604f73062719431cf6df1ffb6 --- base/shell/cmd/parser.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/base/shell/cmd/parser.c b/base/shell/cmd/parser.c index cdea54a8f08..abf2353d563 100644 --- a/base/shell/cmd/parser.c +++ b/base/shell/cmd/parser.c @@ -575,9 +575,10 @@ error: /* Parse a REM command */ static PARSED_COMMAND *ParseRem(void) { - /* Just ignore the rest of the line */ - while (CurChar && CurChar != _T('\n')) - ParseChar(); + /* "Ignore" the rest of the line. + * (Line continuations will still be parsed, though.) */ + while (ParseToken(0, NULL) != TOK_END) + ; return NULL; }