]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ast.c
fixed a typo in asm_instr[]: ES_FNC->EQ_FNC
[xonotic/gmqcc.git] / ast.c
diff --git a/ast.c b/ast.c
index a155f50d879662f4b0bbd4231d405bff1b647d2b..065dfd88dbf2d4fb80dd09c8c70caaa66475cfa7 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -493,7 +493,7 @@ bool ast_global_codegen(ast_value *self, ir_builder *ir)
     ir_value *v = NULL;
     if (self->isconst && self->expression.vtype == TYPE_FUNCTION)
     {
-        ir_function *func = ir_builder_create_function(ir, self->name);
+        ir_function *func = ir_builder_create_function(ir, self->name, self->expression.next->expression.vtype);
         if (!func)
             return false;
 
@@ -1210,7 +1210,7 @@ bool ast_call_codegen(ast_call *self, ast_function *func, bool lvalue, ir_value
             goto error;
     }
 
-    callinstr = ir_block_create_call(func->curblock, ast_function_label(func, "call"), funval, funval->outtype);
+    callinstr = ir_block_create_call(func->curblock, ast_function_label(func, "call"), funval);
     if (!callinstr)
         goto error;