Added an error check for invalid contents in ES_OPENCONTENT. Fixes Jungle Speed and Doc's Punch Out.

Fixes issue 3035.
This commit is contained in:
skidau 2012-02-05 16:16:33 +11:00
parent 0bbb112298
commit c53283185d
1 changed files with 17 additions and 14 deletions

View File

@ -266,6 +266,9 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
m_ContentAccessMap[CFD].m_pContent = AccessContentDevice(m_TitleID).GetContentByIndex(Index);
_dbg_assert_(WII_IPC_ES, m_ContentAccessMap[CFD].m_pContent != NULL);
if (m_ContentAccessMap[CFD].m_pContent == NULL)
CFD = 0xffffffff; //TODO: what is the correct error value here?
Memory::Write_U32(CFD, _CommandAddress + 0x4);
INFO_LOG(WII_IPC_ES, "IOCTL_ES_OPENCONTENT: Index %i -> got CFD %x", Index, CFD);