Don't free non-registers.

- Fixed: ExpEmit::Free() would try to free REGT_NIL registers, which
  don't really exist
This commit is contained in:
Randy Heit 2015-01-07 22:31:48 -06:00
parent 00274c5e4c
commit 9044ac9503

View file

@ -96,7 +96,7 @@ ExpEmit::ExpEmit(VMFunctionBuilder *build, int type)
void ExpEmit::Free(VMFunctionBuilder *build)
{
if (!Fixed && !Konst)
if (!Fixed && !Konst && RegType <= REGT_TYPE)
{
build->Registers[RegType].Return(RegNum, 1);
}