]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
preserve newlines in preprocessed multiline comments
authorWolfgang (Blub) Bumiller <blub@speed.at>
Fri, 23 Nov 2012 20:47:00 +0000 (21:47 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Fri, 23 Nov 2012 20:47:00 +0000 (21:47 +0100)
lexer.c

diff --git a/lexer.c b/lexer.c
index 61fe11f56ce61fbfc1d1bcc2e93c1ac7e7db62ca..ced013379360789d3037b26c523c0dac47a239da 100644 (file)
--- a/lexer.c
+++ b/lexer.c
@@ -607,7 +607,10 @@ static int lex_skipwhite(lex_file *lex)
                         lex_ungetch(lex, ch);
                     }
                     if (lex->flags.preprocessing) {
-                        lex_tokench(lex, ' '); /* ch); */
+                        if (ch == '\n')
+                            lex_tokench(lex, '\n');
+                        else
+                            lex_tokench(lex, ' '); /* ch); */
                     }
                 }
                 ch = ' '; /* cause TRUE in the isspace check */