Merge pull request #20573 from hrydgard/thug-fix

Fix crash on second logo in Tony Hawk's Underground 2
This commit is contained in:
Henrik Rydgård
2025-07-09 16:30:46 +02:00
parent 81583700e1
commit dde8d22ba6
+8 -1
View File
@@ -1244,6 +1244,13 @@ static PSPModule *__KernelLoadELFFromPtr(const u8 *ptr, size_t elfSize, u32 load
modinfo = (const PspModuleInfo *)Memory::GetPointerUnchecked(modinfoaddr);
// OK, even if it's an ELF module, it might be one we shouldn't fully load and execute!
// This is seen with mpeg.prx in Tony Hawk's Underground 2, see #20568.
if (ShouldHLEModule(modinfo->name)) {
// We load it, but at least we don't run any part of it.
module->isFake = true;
}
module->nm.nsegment = reader.GetNumSegments();
module->nm.attribute = modinfo->moduleAttrs;
module->nm.version[0] = modinfo->moduleVersion & 0xFF;
@@ -2074,7 +2081,7 @@ static u32 sceKernelStartModule(u32 moduleId, u32 argsize, u32 argAddr, u32 retu
module->nm.status = MODULE_STATUS_STARTING;
module->waitingThreads.push_back(mwt);
}
return hleLogInfo(Log::sceModule, ret);
return hleLogInfo(Log::sceModule, ret, "'%.*s'", (int)sizeof(module->nm.name), module->nm.name);
}
}