Fixes Issue 2596 @old wiimote plugin. Core data hasnt been zero'd everywhere before usage.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5440 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
39b17ca640
commit
08b5ee6555
|
@ -165,8 +165,9 @@ void WmSendAck(u16 _channelID, u8 _reportID)
|
|||
u8 DataFrame[1024];
|
||||
// Write DataFrame header
|
||||
u32 Offset = WriteWmReportHdr(DataFrame, WM_ACK_DATA);
|
||||
|
||||
wm_acknowledge* pData = (wm_acknowledge*)(DataFrame + Offset);
|
||||
memset(pData, 0, sizeof(wm_acknowledge));
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
FillReportInfo(pData->buttons);
|
||||
#endif
|
||||
|
@ -309,7 +310,8 @@ void SendReadDataReply(u16 _channelID, void* _Base, u16 _Address, u8 _AddressHI,
|
|||
int copySize = (_Size > 16) ? 16 : _Size;
|
||||
// AyuanX: the MTU is 640B though... what a waste!
|
||||
|
||||
wm_read_data_reply* pReply = (wm_read_data_reply*)(DataFrame + Offset);
|
||||
wm_read_data_reply* pReply = (wm_read_data_reply*)(DataFrame + Offset);
|
||||
memset(pReply,0,sizeof(wm_read_data_reply));
|
||||
Offset += sizeof(wm_read_data_reply);
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
|
|
Loading…
Reference in New Issue