[Project64] handle F3 A4 rep movs byte ptr es:[edi],byte ptr [esi] in exception handler

This commit is contained in:
zilmar 2015-05-22 06:09:33 +10:00
parent bc78316504
commit 6f56336031
1 changed files with 3 additions and 4 deletions

View File

@ -1962,11 +1962,10 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
BYTE * TypePos = (unsigned char *)lpEP->ContextRecord->Eip; BYTE * TypePos = (unsigned char *)lpEP->ContextRecord->Eip;
EXCEPTION_RECORD exRec = *lpEP->ExceptionRecord; EXCEPTION_RECORD exRec = *lpEP->ExceptionRecord;
if (*TypePos == 0xF3 && *(TypePos + 1) == 0xA5) if (*TypePos == 0xF3 && (*(TypePos + 1) == 0xA4 || *(TypePos + 1) == 0xA5))
{ {
DWORD Start, End; DWORD Start = (lpEP->ContextRecord->Edi - (DWORD)m_RDRAM);
Start = (lpEP->ContextRecord->Edi - (DWORD)m_RDRAM); DWORD End = Start + lpEP->ContextRecord->Ecx;
End = (Start + (lpEP->ContextRecord->Ecx << 2) - 1);
if ((int)Start < 0) if ((int)Start < 0)
{ {
if (bHaveDebugger()) if (bHaveDebugger())