mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-26 12:04:47 +00:00
return error code if sceKernelLoadStartModule module is invalid
This commit is contained in:
parent
95340f578f
commit
f413ec09df
@ -178,6 +178,9 @@ s32 PS4_SYSV_ABI sceKernelLoadStartModule(const char* moduleFileName, size_t arg
|
|||||||
// Load PRX module and relocate any modules that import it.
|
// Load PRX module and relocate any modules that import it.
|
||||||
auto* linker = Common::Singleton<Core::Linker>::Instance();
|
auto* linker = Common::Singleton<Core::Linker>::Instance();
|
||||||
u32 handle = linker->LoadModule(path);
|
u32 handle = linker->LoadModule(path);
|
||||||
|
if (handle == -1) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EINVAL;
|
||||||
|
}
|
||||||
auto* module = linker->GetModule(handle);
|
auto* module = linker->GetModule(handle);
|
||||||
linker->RelocateAnyImports(module);
|
linker->RelocateAnyImports(module);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user