From 2c92941f6b8a16b73ca485868dd1be6dba6705b2 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Thu, 18 Oct 2012 04:04:33 +0000 Subject: [PATCH] - Fixed: FxCompareRel::Emit() generated broken code for floating point operands. SVN r3895 (scripting) --- src/thingdef/thingdef_expression.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/thingdef/thingdef_expression.cpp b/src/thingdef/thingdef_expression.cpp index 8ef71dec1..da3e7a17e 100644 --- a/src/thingdef/thingdef_expression.cpp +++ b/src/thingdef/thingdef_expression.cpp @@ -1566,7 +1566,7 @@ ExpEmit FxCompareRel::Emit(VMFunctionBuilder *build) { OP_LT_RR, OP_LTF_RR, 0 }, // < { OP_LE_RR, OP_LEF_RR, 1 }, // > { OP_LT_RR, OP_LTF_RR, 1 }, // >= - { OP_LE_RR, OP_LE_RR, 0 } // <= + { OP_LE_RR, OP_LEF_RR, 0 } // <= }; int instr, check, index; @@ -1591,7 +1591,7 @@ ExpEmit FxCompareRel::Emit(VMFunctionBuilder *build) { op1.Free(build); } - ExpEmit to(build, op1.RegType); + ExpEmit to(build, REGT_INT); // See FxUnaryNotBoolean for comments, since it's the same thing. build->Emit(OP_LI, to.RegNum, 0, 0);