# HG changeset patch # User Aras Pranckevicius # Date 1267088750 -7200 # Node ID e72ec737ed740b4af9a35f2f91647e35a361d773 # Parent f9e20269c20bcd1874a7c0fdeeb5ae095dfd4a0f filename in #line is optional diff -r f9e20269c20b -r e72ec737ed74 mojoshader_preprocessor.c --- a/mojoshader_preprocessor.c Thu Feb 25 08:52:46 2010 +0200 +++ b/mojoshader_preprocessor.c Thu Feb 25 11:05:50 2010 +0200 @@ -880,7 +880,15 @@ linenum = token_to_int(state); if (!bogus) - bogus = (lexer(state) != TOKEN_STRING_LITERAL); + { + Token t = lexer(state); + if (t == ((Token) '\n')) + { + state->line = linenum; + return; + } + bogus = (t != TOKEN_STRING_LITERAL); + } if (!bogus) {