mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-23 11:11:22 +00:00
nil check in paramter type checking
This commit is contained in:
parent
5bb9351a3f
commit
819ed10f29
1 changed files with 3 additions and 1 deletions
4
ast.c
4
ast.c
|
@ -909,7 +909,9 @@ bool ast_call_check_types(ast_call *self)
|
|||
count = vec_size(func->expression.params);
|
||||
|
||||
for (i = 0; i < count; ++i) {
|
||||
if (!ast_compare_type(self->params[i], (ast_expression*)(func->expression.params[i]))) {
|
||||
if (self->params[i]->expression.vtype != TYPE_NIL &&
|
||||
!ast_compare_type(self->params[i], (ast_expression*)(func->expression.params[i])))
|
||||
{
|
||||
char texp[1024];
|
||||
char tgot[1024];
|
||||
ast_type_to_string(self->params[i], tgot, sizeof(tgot));
|
||||
|
|
Loading…
Reference in a new issue