SaveState: Fix use-after-resize iterator.

Only on older save states.
This commit is contained in:
Unknown W. Brackets
2017-11-11 08:08:59 -08:00
parent 74a8aa5a91
commit 039c69f031
+3 -1
View File
@@ -301,7 +301,9 @@ public:
} 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 {