From: Wolfgang Bumiller Date: Sun, 14 Jan 2018 08:32:53 +0000 (+0100) Subject: Revert "search for funciton param first before function locals, this fixes #163" X-Git-Tag: xonotic-v0.8.5~26 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e006aa82388218f0f18e93087217d1aa0c2cee83;p=xonotic%2Fgmqcc.git Revert "search for funciton param first before function locals, this fixes #163" This reverts commit 3cf2c52fce792af3e5cc5578b336de83217e625d. --- diff --git a/parser.cpp b/parser.cpp index 9bfd751..1404273 100644 --- a/parser.cpp +++ b/parser.cpp @@ -135,22 +135,17 @@ static ast_expression* parser_find_local(parser_t *parser, const char *name, siz { size_t i, hash; ast_expression *e; - ast_expression *p; hash = util_hthash(parser->htglobals, name); *isparam = false; - p = parser_find_param(parser, name); - if (p) { - *isparam = true; - return p; - } for (i = parser->variables.size(); i > upto;) { --i; if ( (e = (ast_expression*)util_htgeth(parser->variables[i], name, hash)) ) return e; } - return NULL; + *isparam = true; + return parser_find_param(parser, name); } static ast_expression* parser_find_local(parser_t *parser, const std::string &name, size_t upto, bool *isparam) {