From e02440b68a3d13febf8e12f54969842b96b59f6e Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 18 Sep 2016 09:00:12 -0700 Subject: [PATCH] Module: Don't report broken stubs from old states. --- Core/HLE/sceKernelModule.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index db4a7f13b3..e81ed772b7 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -301,8 +301,17 @@ 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) { - ImportFunc(func, true); + if (func.moduleName[KERNELOBJECT_MAX_NAME_LENGTH] != '\0' || !Memory::IsValidAddress(func.stubAddr)) { + foundBroken = true; + } else { + ImportFunc(func, true); + } + } + + if (foundBroken) { + ERROR_LOG(LOADER, "Broken stub import data while loading state"); } }