mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-11 07:03:33 +02:00
Instead of crashing log a warning when trying to skip more codes than are available
This commit is contained in:
+7
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user