From 268ad7db537e25acd8bf915a9efdfcfb368eae98 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Wed, 21 Nov 2012 19:55:12 +0100 Subject: [PATCH] Fix wrong merge_id --- ast.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ast.c b/ast.c index 48605af..3bfb918 100644 --- a/ast.c +++ b/ast.c @@ -1532,7 +1532,7 @@ bool ast_binary_codegen(ast_binary *self, ast_function *func, bool lvalue, ir_va * but we translate this to (!(!a ? !a : !b)) */ - merge_id = vec_size(func->blocks); + merge_id = vec_size(func->ir_func->blocks); merge = ir_function_create_block(func->ir_func, ast_function_label(func, "sce_merge")); cgen = self->left->expression.codegen; @@ -1601,6 +1601,8 @@ bool ast_binary_codegen(ast_binary *self, ast_function *func, bool lvalue, ir_va notop, *out); } + if (!*out) + return false; self->expression.outr = *out; return true; } -- 2.39.2