From 03efb63e93e38efc15869714f761127596ae86de Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 27 Oct 2016 19:14:16 +0200 Subject: [PATCH] - fixed bad register use in postincrement operator. --- src/scripting/codegeneration/codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripting/codegeneration/codegen.cpp b/src/scripting/codegeneration/codegen.cpp index 5148952a7..3eaaa7170 100644 --- a/src/scripting/codegeneration/codegen.cpp +++ b/src/scripting/codegeneration/codegen.cpp @@ -1753,7 +1753,7 @@ ExpEmit FxPostIncrDecr::Emit(VMFunctionBuilder *build) { build->Emit((Token == TK_Incr) ? OP_ADDF_RK : OP_SUBF_RK, assign.RegNum, out.RegNum, build->GetConstantFloat(1.)); } - build->Emit(ValueType->GetStoreOp(), pointer.RegNum, out.RegNum, zero); + build->Emit(ValueType->GetStoreOp(), pointer.RegNum, assign.RegNum, zero); pointer.Free(build); assign.Free(build); return out;