From 108d0d49ece2fa75872bd79c828c10e0e9aac641 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Tue, 9 Jan 2024 02:11:10 +0100 Subject: [PATCH] sceNp: add missing roomPassword check --- rpcs3/Emu/Cell/Modules/sceNp2.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/Modules/sceNp2.cpp b/rpcs3/Emu/Cell/Modules/sceNp2.cpp index 33855565cb..38db62ee20 100644 --- a/rpcs3/Emu/Cell/Modules/sceNp2.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNp2.cpp @@ -1466,7 +1466,10 @@ error_code sceNpMatching2GetRoomPasswordLocal(SceNpMatching2ContextId ctxId, Sce if (password) { if (withPassword) *withPassword = true; - memcpy(roomPassword.get_ptr(), &*password, sizeof(SceNpMatching2SessionPassword)); + if (roomPassword) + { + std::memcpy(roomPassword.get_ptr(), &*password, sizeof(SceNpMatching2SessionPassword)); + } } else {