diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index b6d73cc023..59d23607ad 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -1184,6 +1184,8 @@ static PSPModule *__KernelLoadELFFromPtr(const u8 *ptr, size_t elfSize, u32 load *error_string = StringFromFormat("ELF/PRX truncated: %d > %d", (int)size, (int)elfSize); module->Cleanup(); kernelObjects.Destroy(module->GetUID()); + // TODO: Might be the wrong error code. + error = SCE_KERNEL_ERROR_FILEERR; return nullptr; } const auto maxElfSize = std::max(head->elf_size, head->psp_size);