From 0dae6527ad571598dfa6f69b174319bbcb432055 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 23 Oct 2012 03:19:26 +0000 Subject: [PATCH] - Fixed: FxCompareRel::Emit() needs to allocate the output register before freeing either of the operands. SVN r3903 (scripting) --- src/thingdef/thingdef_expression.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/thingdef/thingdef_expression.cpp b/src/thingdef/thingdef_expression.cpp index da3e7a17e7..2282949fec 100644 --- a/src/thingdef/thingdef_expression.cpp +++ b/src/thingdef/thingdef_expression.cpp @@ -1569,6 +1569,7 @@ ExpEmit FxCompareRel::Emit(VMFunctionBuilder *build) { OP_LE_RR, OP_LEF_RR, 0 } // <= }; int instr, check, index; + ExpEmit to(build, REGT_INT); index = Operator == '<' ? 0 : Operator == '>' ? 1 : @@ -1591,7 +1592,6 @@ ExpEmit FxCompareRel::Emit(VMFunctionBuilder *build) { op1.Free(build); } - ExpEmit to(build, REGT_INT); // See FxUnaryNotBoolean for comments, since it's the same thing. build->Emit(OP_LI, to.RegNum, 0, 0);