mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-25 08:14:45 +02:00
Oops, would still infinite loop on a bad module.
Should really fix #6552 this time.
This commit is contained in:
@@ -1478,9 +1478,14 @@ bool __KernelLoadExec(const char *filename, u32 paramPtr, std::string *error_str
|
||||
{
|
||||
u32 error;
|
||||
while (!loadedModules.empty()) {
|
||||
Module *module = kernelObjects.Get<Module>(*loadedModules.begin(), error);
|
||||
SceUID moduleID = *loadedModules.begin();
|
||||
Module *module = kernelObjects.Get<Module>(moduleID, error);
|
||||
if (module) {
|
||||
module->Cleanup();
|
||||
} else {
|
||||
// An invalid module. We need to remove it or we'll loop forever.
|
||||
WARN_LOG(LOADER, "Invalid module still marked as loaded on loadexec");
|
||||
loadedModules.erase(moduleID);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user