From 9b7c16ec4cbb5282642c377272224e3fc825f860 Mon Sep 17 00:00:00 2001 From: uz Date: Sat, 5 Dec 2009 15:14:11 +0000 Subject: [PATCH] Fixed problem with last change. Wide string constants were not handled correctly. git-svn-id: svn://svn.cc65.org/cc65/trunk@4500 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/scanner.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cc65/scanner.c b/src/cc65/scanner.c index ecd023d05..2bf684268 100644 --- a/src/cc65/scanner.c +++ b/src/cc65/scanner.c @@ -406,10 +406,13 @@ static void CharConst (void) static void StringConst (void) /* Parse a quoted string */ -{ +{ /* String buffer */ StrBuf S = AUTO_STRBUF_INITIALIZER; + /* Assume next token is a string constant */ + NextTok.Tok = TOK_SCONST; + /* Concatenate strings. If at least one of the concenated strings is a wide * character literal, the whole string is a wide char literal, otherwise * it's a normal string literal. @@ -452,7 +455,6 @@ static void StringConst (void) /* Add the whole string to the literal pool */ NextTok.IVal = AddLiteralStr (&S); - NextTok.Tok = TOK_SCONST; /* Free the buffer */ SB_Done (&S); -- 2.39.5