From: Wolfgang Bumiller Date: Wed, 12 Jun 2013 15:32:42 +0000 (+0200) Subject: fix a call typecheck issue X-Git-Tag: v0.3.0~131 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3fab06941ae030805617d359fe8cf5b482ce9e70;p=xonotic%2Fgmqcc.git fix a call typecheck issue --- diff --git a/ast.c b/ast.c index 332f708..5ac6283 100644 --- a/ast.c +++ b/ast.c @@ -1055,11 +1055,11 @@ bool ast_call_check_types(ast_call *self, ast_expression *va_type) if (!ast_call_check_vararg(self, va_type, func->varparam)) retval = false; } - if (!ast_compare_type(self->params[i], func->varparam)) + else if (!ast_compare_type(self->params[i], func->varparam)) { ast_type_to_string(self->params[i], tgot, sizeof(tgot)); ast_type_to_string(func->varparam, texp, sizeof(texp)); - compile_error(ast_ctx(self), "invalid type for parameter %u in function call: expected %s, got %s", + compile_error(ast_ctx(self), "invalid type for variadic parameter %u in function call: expected %s, got %s", (unsigned int)(i+1), texp, tgot); /* we don't immediately return */ retval = false;