From: Wolfgang (Blub) Bumiller Date: Fri, 2 Nov 2012 17:30:20 +0000 (+0100) Subject: Fix a minor bug in the lexer X-Git-Tag: 0.1~56 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2ef0203d172d38f73cbae9698fa3dbdc48f985db;p=xonotic%2Fgmqcc.git Fix a minor bug in the lexer --- diff --git a/lexer.c b/lexer.c index d5f22a3..02a7ff4 100644 --- a/lexer.c +++ b/lexer.c @@ -364,17 +364,11 @@ static int lex_skipwhite(lex_file *lex) ch = lex_getch(lex); if (ch == '*') { ch = lex_getch(lex); - if (ch == '/') { - ch = lex_getch(lex); + if (ch == '/') break; - } } } - if (ch == '/') /* allow *//* direct following comment */ - { - lex_ungetch(lex, ch); - ch = ' '; /* cause TRUE in the isspace check */ - } + ch = ' '; /* cause TRUE in the isspace check */ continue; } /* Otherwise roll back to the slash and break out of the loop */