]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Allow strings to contain a backslash and a newline at the end
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 17:38:04 +0000 (18:38 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 17:38:04 +0000 (18:38 +0100)
lexer.c

diff --git a/lexer.c b/lexer.c
index 17af7b6f4b92ad7ca30c2da8bd4f5a2161afbb7b..c7fec4468698c8824b5736af414474a4687dde55 100644 (file)
--- a/lexer.c
+++ b/lexer.c
@@ -770,6 +770,7 @@ static int GMQCC_WARN lex_finish_string(lex_file *lex, int quote)
             case 't':  ch = '\t'; break;
             case 'f':  ch = '\f'; break;
             case 'v':  ch = '\v'; break;
+            case '\n':  ch = '\n'; break;
             default:
                 lexwarn(lex, WARN_UNKNOWN_CONTROL_SEQUENCE, "unrecognized control sequence: \\%c", ch);
                 /* so we just add the character plus backslash no matter what it actually is */