From: Wolfgang Bumiller Date: Wed, 16 Jan 2013 21:09:27 +0000 (+0100) Subject: fix: trigraph check screwing up linenumbering X-Git-Tag: before-library~243 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b31e9b63ebdf9f3c03d7cdae34b49880d95332fb;p=xonotic%2Fgmqcc.git fix: trigraph check screwing up linenumbering --- diff --git a/lexer.c b/lexer.c index abb3e33..3781496 100644 --- a/lexer.c +++ b/lexer.c @@ -291,12 +291,16 @@ static int lex_try_trigraph(lex_file *lex, int old) { int c2, c3; c2 = lex_fgetc(lex); + if (!lex->push_line && c2 == '\n') + lex->line++; if (c2 != '?') { lex_ungetch(lex, c2); return old; } c3 = lex_fgetc(lex); + if (!lex->push_line && c3 == '\n') + lex->line++; switch (c3) { case '=': return '#'; case '/': return '\\';