mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-21 10:51:10 +00:00
don't try to create jumps in ifs if the block is already done
This commit is contained in:
parent
adda894976
commit
49cd86e8ed
1 changed files with 2 additions and 2 deletions
4
ast.c
4
ast.c
|
@ -1333,9 +1333,9 @@ bool ast_ifthen_codegen(ast_ifthen *self, ast_function *func, bool lvalue, ir_va
|
|||
return false;
|
||||
|
||||
/* add jumps ot the merge block */
|
||||
if (ontrue && !ir_block_create_jump(ontrue, merge))
|
||||
if (ontrue && !ontrue->final && !ir_block_create_jump(ontrue, merge))
|
||||
return false;
|
||||
if (onfalse && !ir_block_create_jump(onfalse, merge))
|
||||
if (onfalse && !onfalse->final && !ir_block_create_jump(onfalse, merge))
|
||||
return false;
|
||||
|
||||
/* we create the if here, that way all blocks are ordered :)
|
||||
|
|
Loading…
Reference in a new issue