Skip to content

Commit f51e55e

Browse files
committed
fix bad condition var (scr_baddiecollisionbox)
1 parent ad57378 commit f51e55e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

UndertaleModLib/Decompiler/Decompiler.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3686,7 +3686,8 @@ private static BlockHLStatement HLDecompileBlocks(DecompileContext context, ref
36863686
}
36873687

36883688
if (output.Statements.Count >= 1 && output.Statements[output.Statements.Count - 1] is TempVarAssignmentStatement &&
3689-
block.Instructions.Count >= 1 && block.Instructions[block.Instructions.Count - 1].Kind == UndertaleInstruction.Opcode.Bt &&
3689+
block.Instructions.Count >= 4 && block.Instructions[block.Instructions.Count - 1].Kind == UndertaleInstruction.Opcode.Bt &&
3690+
block.Instructions.Count >= 4 && block.Instructions[block.Instructions.Count - 4].Kind == UndertaleInstruction.Opcode.Dup &&
36903691
block.conditionalExit && block.ConditionStatement is ExpressionCompare &&
36913692
(block.ConditionStatement as ExpressionCompare).Opcode == UndertaleInstruction.ComparisonType.EQ)
36923693
{

0 commit comments

Comments
 (0)