From c3d083fe334d59ae18b874c626881477551d0c5d Mon Sep 17 00:00:00 2001 From: JT Date: Mon, 20 Jul 2015 18:55:25 -0400 Subject: [PATCH 1/3] Fix bug #182 --- src/ca65/scanner.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ca65/scanner.c b/src/ca65/scanner.c index 20053e7e6..9df28a8af 100644 --- a/src/ca65/scanner.c +++ b/src/ca65/scanner.c @@ -1417,13 +1417,17 @@ CharAgain: case '\\': /* Line continuation? */ if (LineCont) { - NextChar (); + NextChar(); + /* Next char should be a LF, if not, will result in an error later */ if (C == '\n') { - /* Handle as white space */ - NextChar (); - C = ' '; + /* Ignore the '\n' */ + NextChar(); goto Again; } + else { + /* Make it clear what the problem is: */ + Error("EOL expected."); + } } break; From 10579d04213be5d3360d1f713aab22272f287175 Mon Sep 17 00:00:00 2001 From: JT Date: Mon, 20 Jul 2015 19:12:30 -0400 Subject: [PATCH 2/3] Fix style --- src/ca65/scanner.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ca65/scanner.c b/src/ca65/scanner.c index 9df28a8af..16e67ee8a 100644 --- a/src/ca65/scanner.c +++ b/src/ca65/scanner.c @@ -1417,16 +1417,16 @@ CharAgain: case '\\': /* Line continuation? */ if (LineCont) { - NextChar(); + NextChar (); /* Next char should be a LF, if not, will result in an error later */ if (C == '\n') { /* Ignore the '\n' */ - NextChar(); + NextChar (); goto Again; } else { /* Make it clear what the problem is: */ - Error("EOL expected."); + Error ("EOL expected."); } } break; From cacc5e2acee7672932aeb98092f5e2942e13aeb8 Mon Sep 17 00:00:00 2001 From: JT Date: Mon, 20 Jul 2015 19:16:48 -0400 Subject: [PATCH 3/3] Style again --- src/ca65/scanner.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ca65/scanner.c b/src/ca65/scanner.c index 16e67ee8a..aaba56764 100644 --- a/src/ca65/scanner.c +++ b/src/ca65/scanner.c @@ -1423,8 +1423,7 @@ CharAgain: /* Ignore the '\n' */ NextChar (); goto Again; - } - else { + } else { /* Make it clear what the problem is: */ Error ("EOL expected."); }