From: Wolfgang Bumiller Date: Thu, 19 Jul 2012 16:10:12 +0000 (+0200) Subject: additional/superfluous check removed X-Git-Tag: 0.1-rc1~425 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e7f8647d08aab0501b82727193a37fb52c242410;p=xonotic%2Fgmqcc.git additional/superfluous check removed --- diff --git a/parser.c b/parser.c index ac49967..a59efe4 100644 --- a/parser.c +++ b/parser.c @@ -208,7 +208,7 @@ bool parser_do(parser_t *parser) return false; if (parser->tok == '#') { - if (!func) { + if (!isfunc || !func) { parseerror(parser, "unexpected builtin number, '%s' is not a function", var->name); return false; } @@ -225,8 +225,7 @@ bool parser_do(parser_t *parser) return false; } - if (func) - func->builtin = -parser_token(parser)->constval.i; + func->builtin = -parser_token(parser)->constval.i; } else if (parser->tok == '{') { /* function body */ } else {