Fix linecounting mistake in try_digraph

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-25 21:07:03 +01:00
parent 3424b7227b
commit 36cdffe1b3

View file

@ -318,6 +318,11 @@ static int lex_try_digraph(lex_file *lex, int ch)
{
int c2;
c2 = lex_fgetc(lex);
/* we just used fgetc() so count lines
* need to offset a \n the ungetch would recognize
*/
if (!lex->push_line && c2 == '\n')
lex->line++;
if (ch == '<' && c2 == ':')
return '[';
else if (ch == ':' && c2 == '>')