Permalink
Browse files

SaveState: Fix use-after-resize iterator.

Only on older save states.
  • Loading branch information...
unknownbrackets committed Nov 11, 2017
1 parent 74a8aa5 commit 039c69f0318dcbe10a94933d70c397cb612265f8
Showing with 3 additions and 1 deletion.
  1. +3 −1 Core/HLE/sceKernelModule.cpp
@@ -301,7 +301,9 @@ class Module : public KernelObject {
} else {
// Older save state. Let's still reload, but this may not pick up new flags, etc.
bool foundBroken = false;
for (auto func : importedFuncs) {
auto importedFuncsState = importedFuncs;
importedFuncs.clear();
for (auto func : importedFuncsState) {
if (func.moduleName[KERNELOBJECT_MAX_NAME_LENGTH] != '\0' || !Memory::IsValidAddress(func.stubAddr)) {
foundBroken = true;
} else {

0 comments on commit 039c69f

Please sign in to comment.