mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-04-09 19:42:04 +00:00
linecounting fix for push/pop(line) pragmas
This commit is contained in:
parent
e3acdcf0a9
commit
f65dbda659
1 changed files with 4 additions and 2 deletions
6
lexer.c
6
lexer.c
|
@ -445,7 +445,8 @@ static bool lex_try_pragma(lex_file *lex)
|
|||
if (!strcmp(command, "push")) {
|
||||
if (!strcmp(param, "line")) {
|
||||
lex->push_line++;
|
||||
--line;
|
||||
if (lex->push_line == 1)
|
||||
--line;
|
||||
}
|
||||
else
|
||||
goto unroll;
|
||||
|
@ -454,7 +455,8 @@ static bool lex_try_pragma(lex_file *lex)
|
|||
if (!strcmp(param, "line")) {
|
||||
if (lex->push_line)
|
||||
lex->push_line--;
|
||||
--line;
|
||||
if (lex->push_line == 0)
|
||||
--line;
|
||||
}
|
||||
else
|
||||
goto unroll;
|
||||
|
|
Loading…
Reference in a new issue