mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-12-18 00:11:06 +00:00
don't try to access function-local functions outside of functions...
This commit is contained in:
parent
dd995a8ee2
commit
470fc68b06
1 changed files with 2 additions and 0 deletions
2
parser.c
2
parser.c
|
@ -226,6 +226,8 @@ ast_expression* parser_find_local(parser_t *parser, const char *name, size_t upt
|
|||
if (!strcmp(parser->locals[i].name, name))
|
||||
return parser->locals[i].var;
|
||||
}
|
||||
if (!parser->function)
|
||||
return NULL;
|
||||
fun = parser->function->vtype;
|
||||
for (i = 0; i < fun->expression.params_count; ++i) {
|
||||
if (!strcmp(fun->expression.params[i]->name, name))
|
||||
|
|
Loading…
Reference in a new issue