From: Wolfgang Bumiller Date: Thu, 19 Jul 2012 09:22:09 +0000 (+0200) Subject: Don't die on regular EOF X-Git-Tag: 0.1-rc1~434 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d6cd3b6dc93c4ab587bddc6885831566c3a502ed;p=xonotic%2Fgmqcc.git Don't die on regular EOF --- diff --git a/parser.c b/parser.c index 896c729..80347df 100644 --- a/parser.c +++ b/parser.c @@ -146,6 +146,8 @@ bool parser_compile(const char *filename) while (parser->tok != TOKEN_EOF && parser->tok < TOKEN_ERROR) { if (!parser_do(parser)) { + if (parser->tok == TOKEN_EOF) + break; printf("parse error\n"); lex_close(parser->lex); mem_d(parser);