Real Wiimote: fix a crash some people were having, and fix IR behavior (by turning off some msvc++ optimizations...)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4610 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman
2009-11-25 16:22:46 +00:00
parent 7118900d3b
commit 6145dd2967
7 changed files with 23 additions and 36 deletions

View File

@ -144,14 +144,14 @@ void ReadData()
if (pBuffer[1] >= 0x30)
{
// Copy Buffer to LastReport
memcpy(m_LastReport.m_PayLoad, pBuffer + 1, MAX_PAYLOAD);
memcpy(m_LastReport.m_PayLoad, pBuffer + 1, MAX_PAYLOAD - 1);
m_LastReportValid = true;
}
else
{
// Copy Buffer to ImportantEvent
SEvent ImportantEvent;
memcpy(ImportantEvent.m_PayLoad, pBuffer + 1, MAX_PAYLOAD);
memcpy(ImportantEvent.m_PayLoad, pBuffer + 1, MAX_PAYLOAD - 1);
// Put it in the read queue right away
m_EventReadQueue.push(ImportantEvent);