X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=ast.c;h=32ab1a2781bb60dab72082721eed7ef0408c6019;hb=a7fdbbe35beb9c12a2f4822b716c7c487a7273e1;hp=dd98a83b0f9602931c32d2a3d8e3134f8d4faa79;hpb=10b75fd8b9ebc7ea6dbfd802dde13af4ec4c2414;p=xonotic%2Fgmqcc.git diff --git a/ast.c b/ast.c index dd98a83..32ab1a2 100644 --- a/ast.c +++ b/ast.c @@ -2534,9 +2534,9 @@ bool ast_ifthen_codegen(ast_ifthen *self, ast_function *func, bool lvalue, ir_va cond = func->curblock; /* try constant folding away the if */ - if ((fold = fold_cond((ast_value*)condval, func, self)) != -1) + if ((fold = fold_cond(condval, func, self)) != -1) return fold; - + if (self->on_true) { /* create on-true block */ ontrue = ir_function_create_block(ast_ctx(self), func->ir_func, ast_function_label(func, "ontrue"));