mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-17 09:02:25 +00:00
fix: don't mess up multiline macros in files ending with \r\n
This commit is contained in:
parent
1dfd375738
commit
80184b0d80
1 changed files with 2 additions and 0 deletions
2
lexer.c
2
lexer.c
|
@ -992,6 +992,8 @@ int lex_do(lex_file *lex)
|
||||||
if (!lex->flags.mergelines || ch != '\\')
|
if (!lex->flags.mergelines || ch != '\\')
|
||||||
break;
|
break;
|
||||||
ch = lex_getch(lex);
|
ch = lex_getch(lex);
|
||||||
|
if (ch == '\r')
|
||||||
|
ch = lex_getch(lex);
|
||||||
if (ch != '\n') {
|
if (ch != '\n') {
|
||||||
lex_ungetch(lex, ch);
|
lex_ungetch(lex, ch);
|
||||||
ch = '\\';
|
ch = '\\';
|
||||||
|
|
Loading…
Reference in a new issue