From 6dd96d3db9c89fa3f6a1ffd783879502071c0a51 Mon Sep 17 00:00:00 2001 From: Eladash Date: Wed, 16 Oct 2019 06:46:43 +0300 Subject: [PATCH] Fixes for cellUserInfoGetList - Don't allow all args to be nullptr at once. - Fill listBuf with zeroes for unwritten entries - Fix userId set in listBuf Similarly to what the firmware does --- rpcs3/Emu/Cell/Modules/cellUserInfo.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellUserInfo.cpp b/rpcs3/Emu/Cell/Modules/cellUserInfo.cpp index 64f72f3498..0e2e367373 100644 --- a/rpcs3/Emu/Cell/Modules/cellUserInfo.cpp +++ b/rpcs3/Emu/Cell/Modules/cellUserInfo.cpp @@ -104,9 +104,12 @@ error_code cellUserInfoGetList(vm::ptr listNum, vm::ptr listNum, vm::ptruserId[0] = 1; + std::memset(listBuf.get_ptr(), 0, listBuf.size()); + + // We report only one user, so it must be the current user + listBuf->userId[0] = Emu.GetUsrId(); } if (currentUserId)