mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-23 18:45:36 +00:00
Error if the module doesn't exist
Fixes another thing kalaposfos found
This commit is contained in:
parent
e389d03601
commit
a9b26dd565
@ -118,11 +118,14 @@ s32 PS4_SYSV_ABI sceKernelGetModuleInfoForUnwind(VAddr addr, s32 flags,
|
|||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceKernelGetModuleInfoFromAddr(VAddr addr, int flags,
|
s32 PS4_SYSV_ABI sceKernelGetModuleInfoFromAddr(VAddr addr, s32 flags,
|
||||||
Core::OrbisKernelModuleInfoEx* info) {
|
Core::OrbisKernelModuleInfoEx* info) {
|
||||||
LOG_INFO(Lib_Kernel, "called addr = {:#x}, flags = {:#x}", addr, flags);
|
LOG_INFO(Lib_Kernel, "called addr = {:#x}, flags = {:#x}", addr, flags);
|
||||||
auto* linker = Common::Singleton<Core::Linker>::Instance();
|
auto* linker = Common::Singleton<Core::Linker>::Instance();
|
||||||
auto* module = linker->FindByAddress(addr);
|
auto* module = linker->FindByAddress(addr);
|
||||||
|
if (!module) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EFAULT;
|
||||||
|
}
|
||||||
*info = module->GetModuleInfoEx();
|
*info = module->GetModuleInfoEx();
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user