mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-14 08:30:49 +00:00
Fixed: FxIntCast::Emit() should free the source register
This commit is contained in:
parent
b14f768b68
commit
10a2c0f58a
1 changed files with 1 additions and 0 deletions
|
@ -440,6 +440,7 @@ ExpEmit FxIntCast::Emit(VMFunctionBuilder *build)
|
||||||
ExpEmit from = basex->Emit(build);
|
ExpEmit from = basex->Emit(build);
|
||||||
assert(!from.Konst);
|
assert(!from.Konst);
|
||||||
assert(basex->ValueType == VAL_Float);
|
assert(basex->ValueType == VAL_Float);
|
||||||
|
from.Free(build);
|
||||||
ExpEmit to(build, REGT_INT);
|
ExpEmit to(build, REGT_INT);
|
||||||
build->Emit(OP_CAST, to.RegNum, from.RegNum, CAST_F2I);
|
build->Emit(OP_CAST, to.RegNum, from.RegNum, CAST_F2I);
|
||||||
return to;
|
return to;
|
||||||
|
|
Loading…
Reference in a new issue