From a76dcdc4193f566bc7f8a3e14dd26d0ed0951074 Mon Sep 17 00:00:00 2001 From: Greg King Date: Mon, 20 Aug 2018 17:51:22 -0400 Subject: [PATCH] Removed the compiler's recovery code for illegal escaped characters. It caused the error cascade that it was supposed to prevent. --- src/cc65/scanner.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/cc65/scanner.c b/src/cc65/scanner.c index c9009bc2f..90c0f73f6 100644 --- a/src/cc65/scanner.c +++ b/src/cc65/scanner.c @@ -347,16 +347,8 @@ static int ParseChar (void) Error ("Octal character constant out of range"); break; default: - Error ("Illegal character constant"); - C = ' '; - /* Try to do error recovery, otherwise the compiler will spit - ** out thousands of errors in this place and abort. - */ - if (CurC != '\'' && CurC != '\0') { - while (NextC != '\'' && NextC != '\"' && NextC != '\0') { - NextChar (); - } - } + Error ("Illegal escaped character"); + C = CurC; break; } } else { -- 2.39.5