From: Wolfgang (Blub) Bumiller Date: Sun, 25 Nov 2012 16:50:31 +0000 (+0100) Subject: linecounting issue in the lexer X-Git-Tag: 0.1.9~261 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=04347508e688d51236e3097b796e80674a2b1ed5;p=xonotic%2Fgmqcc.git linecounting issue in the lexer --- diff --git a/lexer.c b/lexer.c index 10a0091..49b8ada 100644 --- a/lexer.c +++ b/lexer.c @@ -883,14 +883,14 @@ int lex_do(lex_file *lex) continue; } - lex->sline = lex->line; - lex->tok.ctx.line = lex->sline; - lex->tok.ctx.file = lex->name; - if (lex->flags.preprocessing && (ch == TOKEN_WHITE || ch == TOKEN_EOL || ch == TOKEN_FATAL)) { return (lex->tok.ttype = ch); } + lex->sline = lex->line; + lex->tok.ctx.line = lex->sline; + lex->tok.ctx.file = lex->name; + if (lex->eof) return (lex->tok.ttype = TOKEN_FATAL);