From: Wolfgang Bumiller Date: Thu, 25 Apr 2013 17:18:50 +0000 (+0200) Subject: solve it, not hide it X-Git-Tag: 0.2.9~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d4f8e4a0dd1eeee80b8510bfe7be559589501f0a;p=xonotic%2Fgmqcc.git solve it, not hide it --- diff --git a/parser.c b/parser.c index 14cf583..7fba786 100644 --- a/parser.c +++ b/parser.c @@ -5689,7 +5689,9 @@ skipvar: /* we only want the integral part anyways */ builtin_num = integral; - } else if (parser->tok != TOKEN_INTCONST) { + } else if (parser->tok == TOKEN_INTCONST) { + builtin_num = parser_token(parser)->constval.i; + } else { parseerror(parser, "builtin number must be a compile time constant"); break; } @@ -5709,9 +5711,7 @@ skipvar: } vec_push(parser->functions, func); - func->builtin = -((OPTS_FLAG(EXPRESSIONS_FOR_BUILTINS)) - ? builtin_num - : parser_token(parser)->constval.i) - 1; + func->builtin = -builtin_num-1; } if (OPTS_FLAG(EXPRESSIONS_FOR_BUILTINS)