diff --git a/src/hx/cppia/Cppia.cpp b/src/hx/cppia/Cppia.cpp index ad37f40d8..1df02748a 100644 --- a/src/hx/cppia/Cppia.cpp +++ b/src/hx/cppia/Cppia.cpp @@ -3667,8 +3667,10 @@ void genSetter(CppiaCompiler *compiler, const JitVal &ioValue, ExprType exprType compiler->mult(ioValue, sJitTempF0, ioValue,true); else { - compiler->mult(sJitTempF0, sJitTempF0, ioValue,true); - compiler->convert(sJitTempF0, etFloat, ioValue, exprType ); + JitTemp fval(compiler, jtFloat); + compiler->convert(ioValue, exprType, fval, etFloat); + compiler->mult(sJitTempF0, sJitTempF0, fval, true); + compiler->convert(sJitTempF0, etFloat, ioValue, exprType); } } break; diff --git a/test/cppia/Client.hx b/test/cppia/Client.hx index 67842a75a..8b1bf020b 100644 --- a/test/cppia/Client.hx +++ b/test/cppia/Client.hx @@ -189,6 +189,14 @@ class Client default: } + // regression test for #926 + var x:Dynamic = 3; + x *= 5; + if (x != 15) { + Common.status = 'Failed regression test for #926. x: $x'; + return; + } + final extending = new ClientExtendedExtendedRoot(); extending.addValue();