diff --git a/rpcs3/Emu/Cell/Modules/cellUserInfo.cpp b/rpcs3/Emu/Cell/Modules/cellUserInfo.cpp index d2ad711d42..306b7bd597 100644 --- a/rpcs3/Emu/Cell/Modules/cellUserInfo.cpp +++ b/rpcs3/Emu/Cell/Modules/cellUserInfo.cpp @@ -33,7 +33,8 @@ error_code cellUserInfoGetStat(u32 id, vm::ptr stat) if (id > CELL_SYSUTIL_USERID_MAX) { - return CELL_USERINFO_ERROR_NOUSER; + // ****** sysutil userinfo parameter error : 1 ****** + return {CELL_USERINFO_ERROR_PARAM, "1"}; } if (id == CELL_SYSUTIL_USERID_CURRENT) @@ -42,9 +43,6 @@ error_code cellUserInfoGetStat(u32 id, vm::ptr stat) id = Emu.GetUsrId(); } - if (!stat) - return CELL_USERINFO_ERROR_PARAM; - const std::string& path = vfs::get(fmt::format("/dev_hdd0/home/%08d/", id)); if (!fs::is_dir(path)) @@ -61,8 +59,11 @@ error_code cellUserInfoGetStat(u32 id, vm::ptr stat) return CELL_USERINFO_ERROR_INTERNAL; } - stat->id = id; - strcpy_trunc(stat->name, f.to_string()); + if (stat) + { + stat->id = id; + strcpy_trunc(stat->name, f.to_string()); + } return CELL_OK; }