From: Wolfgang (Blub) Bumiller Date: Mon, 20 Aug 2012 16:14:02 +0000 (+0200) Subject: better handlign of a too early error condition X-Git-Tag: 0.1-rc1~131 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5a0995c767e0cbc7f47d9db668163f57ac7613c1;p=xonotic%2Fgmqcc.git better handlign of a too early error condition --- diff --git a/parser.c b/parser.c index 4f5b7be..21a944b 100644 --- a/parser.c +++ b/parser.c @@ -2685,12 +2685,17 @@ bool parser_compile(const char *filename) if (parser->tok == TOKEN_EOF) parseerror(parser, "unexpected eof"); else if (!parser->errors) - parseerror(parser, "parse error\n"); + parseerror(parser, "parse error"); lex_close(parser->lex); parser->lex = NULL; return false; } } + } else { + parseerror(parser, "parse error"); + lex_close(parser->lex); + parser->lex = NULL; + return false; } lex_close(parser->lex);