From: uz Date: Sat, 5 Dec 2009 15:14:11 +0000 (+0000) Subject: Fixed problem with last change. Wide string constants were not handled X-Git-Tag: V2.13.1~29 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9b7c16ec4cbb5282642c377272224e3fc825f860;p=cc65 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 --- 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);