mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 06:02:22 +00:00
Revert "search for funciton param first before function locals, this fixes #163"
This reverts commit 3cf2c52fce
.
This commit is contained in:
parent
73d3d7eec1
commit
e006aa8238
1 changed files with 2 additions and 7 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue