]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Use the field parameter type on the raw paramter type list for their sizes.
authorWolfgang (Blub) Bumiller <blub@speed.at>
Fri, 30 Nov 2012 19:33:40 +0000 (20:33 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Fri, 30 Nov 2012 19:33:40 +0000 (20:33 +0100)
ast.c

diff --git a/ast.c b/ast.c
index 063084fd1967953c265cccef04023109372b2490..390faf7e073117b33cde5fe6d87a0b1fe247fac6 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -1416,7 +1416,10 @@ bool ast_function_codegen(ast_function *self, ir_builder *ir)
     ec = &self->vtype->expression;
     for (i = 0; i < vec_size(ec->params); ++i)
     {
-        vec_push(irf->params, ec->params[i]->expression.vtype);
+        if (ec->params[i]->expression.vtype == TYPE_FIELD)
+            vec_push(irf->params, ec->params[i]->expression.next->expression.vtype);
+        else
+            vec_push(irf->params, ec->params[i]->expression.vtype);
         if (!self->builtin) {
             if (!ast_local_codegen(ec->params[i], self->ir_func, true))
                 return false;