Fixed: FxIntCast::Emit() should free the source register

This commit is contained in:
Randy Heit 2014-12-21 22:03:16 -06:00
parent b14f768b68
commit 10a2c0f58a

View file

@ -440,6 +440,7 @@ ExpEmit FxIntCast::Emit(VMFunctionBuilder *build)
ExpEmit from = basex->Emit(build);
assert(!from.Konst);
assert(basex->ValueType == VAL_Float);
from.Free(build);
ExpEmit to(build, REGT_INT);
build->Emit(OP_CAST, to.RegNum, from.RegNum, CAST_F2I);
return to;