mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-18 13:21:33 +00:00
Instead of crashing log a warning when trying to skip more codes than are available
This commit is contained in:
parent
1fa67104ce
commit
101287c8c2
@ -206,7 +206,13 @@ std::vector<int> CWCheatEngine::GetNextCode() { // Feeds a size-2 vector of ints
|
||||
|
||||
void CWCheatEngine::SkipCodes(int count) {
|
||||
for (int i = 0; i < count; i ++) {
|
||||
if (GetNextCode()[0] == 0) {
|
||||
auto code = GetNextCode();
|
||||
if (code.empty())
|
||||
{
|
||||
WARN_LOG(COMMON, "CWCHEAT: Tried to skip more codes than there are, the cheat is most likely wrong");
|
||||
break;
|
||||
}
|
||||
if (code[0] == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user