dmnt: prevent lag on game thread-spawning

This commit is contained in:
Michael Scire 2019-03-05 18:57:50 -08:00
parent a3d44e37b5
commit 512dbc3a24
3 changed files with 70 additions and 13 deletions

View file

@ -441,6 +441,7 @@ bool DmntCheatVm::LoadProgram(const CheatEntry *cheats, size_t num_cheats) {
if (cheats[i].enabled) {
/* Bounds check. */
if (cheats[i].definition.num_opcodes + this->num_opcodes > MaximumProgramOpcodeCount) {
this->num_opcodes = 0;
return false;
}