1
0
Fork 0
forked from suyu/suyu

dmnt_cheat_vm: Correct register Restore and ClearRegs behavior

Previously these were performing the same behavior as the Save and
ClearSaved opcode types.
This commit is contained in:
Lioncash 2019-10-17 18:48:38 -04:00
parent 9fe8072c67
commit 2c34d8aabb

View file

@ -1133,8 +1133,8 @@ void DmntCheatVm::Execute(const CheatProcessMetadata& metadata) {
case SaveRestoreRegisterOpType::ClearRegs: case SaveRestoreRegisterOpType::ClearRegs:
case SaveRestoreRegisterOpType::Restore: case SaveRestoreRegisterOpType::Restore:
default: default:
src = registers.data(); src = saved_values.data();
dst = saved_values.data(); dst = registers.data();
break; break;
} }
for (std::size_t i = 0; i < NumRegisters; i++) { for (std::size_t i = 0; i < NumRegisters; i++) {