Exceptions fixed

This commit is contained in:
Nekotekina 2014-07-11 15:32:34 +04:00
parent ad524798fa
commit 2fe52451e1
2 changed files with 13 additions and 13 deletions

View file

@ -283,7 +283,7 @@ void CPUThread::ExecOnce()
#ifdef _WIN32
void _se_translator(unsigned int u, EXCEPTION_POINTERS* pExp)
{
const u64 addr = (u64)Memory.GetBaseAddr() - (u64)pExp->ExceptionRecord->ExceptionAddress;
const u64 addr = (u64)pExp->ExceptionRecord->ExceptionInformation[1] - (u64)Memory.GetBaseAddr();
if (addr < 0x100000000 && u == EXCEPTION_ACCESS_VIOLATION)
{
// TODO: allow recovering from a page fault