From: Wolfgang Bumiller Date: Mon, 31 Dec 2012 10:30:02 +0000 (+0100) Subject: nil check in paramter type checking X-Git-Tag: before-library~416 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=819ed10f29a8b105540407c049e142b883b07a99;p=xonotic%2Fgmqcc.git nil check in paramter type checking --- diff --git a/ast.c b/ast.c index 9d10cc6..f18499b 100644 --- a/ast.c +++ b/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));