From 195f24507b5caf08239a7f027c201390ddf1cbfc Mon Sep 17 00:00:00 2001 From: Jake Date: Tue, 30 May 2017 21:54:35 -0500 Subject: [PATCH] cellPad: Clear info structs before setting --- rpcs3/Emu/Cell/Modules/cellPad.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rpcs3/Emu/Cell/Modules/cellPad.cpp b/rpcs3/Emu/Cell/Modules/cellPad.cpp index ccb40acb9e..16fe6b8086 100644 --- a/rpcs3/Emu/Cell/Modules/cellPad.cpp +++ b/rpcs3/Emu/Cell/Modules/cellPad.cpp @@ -287,6 +287,8 @@ s32 cellPadPeriphGetInfo(vm::ptr info) const PadInfo& rinfo = handler->GetInfo(); + std::memset(info.get_ptr(), 0, sizeof(CellPadPeriphInfo)); + info->max_connect = rinfo.max_connect; info->now_connect = rinfo.now_connect; info->system_info = rinfo.system_info; @@ -394,6 +396,8 @@ s32 cellPadGetInfo(vm::ptr info) if (!handler) return CELL_PAD_ERROR_UNINITIALIZED; + std::memset(info.get_ptr(), 0, sizeof(CellPadInfo)); + const PadInfo& rinfo = handler->GetInfo(); info->max_connect = rinfo.max_connect; info->now_connect = rinfo.now_connect; @@ -424,6 +428,8 @@ s32 cellPadGetInfo2(vm::ptr info) if (!handler) return CELL_PAD_ERROR_UNINITIALIZED; + std::memset(info.get_ptr(), 0, sizeof(CellPadInfo2)); + const PadInfo& rinfo = handler->GetInfo(); info->max_connect = rinfo.max_connect; info->now_connect = rinfo.now_connect;