From bd741ec57f0cab8a91099d91031865ce65df4c5d Mon Sep 17 00:00:00 2001 From: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com> Date: Sat, 27 Jun 2026 15:57:54 +0200 Subject: [PATCH] Don't attempt to LLE the full contents of sys_modules when param.sfo is missing (#4632) --- .../sysmodule/sysmodule_internal.cpp | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/core/libraries/sysmodule/sysmodule_internal.cpp b/src/core/libraries/sysmodule/sysmodule_internal.cpp index a29aaaa45..aef4576aa 100644 --- a/src/core/libraries/sysmodule/sysmodule_internal.cpp +++ b/src/core/libraries/sysmodule/sysmodule_internal.cpp @@ -190,21 +190,23 @@ s32 loadModuleInternal(s32 index, s32 argc, const void* argv, s32* res_out) { // Now we need to check if the requested library is allowed to LLE. // First, we allow all modules from game-specific sys_modules const auto& sys_module_path = EmulatorSettings.GetSysModulesDir(); - const auto& game_specific_module_path = - sys_module_path / game_info->GameSerial() / mod_name; - if (std::filesystem::exists(game_specific_module_path)) { - // The requested module is present in the game-specific sys_modules, load it. - LOG_INFO(Loader, "Loading {} from game serial file {}", mod_name, - game_info->GameSerial()); - s32 handle = - linker->LoadAndStartModule(game_specific_module_path, argc, argv, &start_result); - ASSERT_MSG(handle >= 0, "Failed to load module {}", mod_name); - mod.handle = handle; - mod.is_loaded++; - if (res_out != nullptr) { - *res_out = start_result; + if (!game_info->GameSerial().empty()) { + const auto& game_specific_module_path = + sys_module_path / game_info->GameSerial() / mod_name; + if (std::filesystem::exists(game_specific_module_path)) { + // The requested module is present in the game-specific sys_modules, load it. + LOG_INFO(Loader, "Loading {} from game serial file {}", mod_name, + game_info->GameSerial()); + s32 handle = linker->LoadAndStartModule(game_specific_module_path, argc, argv, + &start_result); + ASSERT_MSG(handle >= 0, "Failed to load module {}", mod_name); + mod.handle = handle; + mod.is_loaded++; + if (res_out != nullptr) { + *res_out = start_result; + } + return ORBIS_OK; } - return ORBIS_OK; } // We need to check a few things here.