Stop memory modification check when a invalid address is found
This commit is contained in:
parent
a718b60d06
commit
6cf9a04d98
@ -268,8 +268,14 @@ namespace ARMeilleure.Memory
|
||||
|
||||
while (address < endAddress)
|
||||
{
|
||||
if (IsValidPosition((long)address))
|
||||
// If the address is invalid, we stop and consider all the remaining memory
|
||||
// as not modified (since the address is invalid, we can't check, and technically
|
||||
// the memory doesn't exist).
|
||||
if (!IsValidPosition((long)address))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
byte* ptr = ((byte**)_pageTable)[address >> PageBits];
|
||||
|
||||
ulong ptrUlong = (ulong)ptr;
|
||||
@ -291,11 +297,6 @@ namespace ARMeilleure.Memory
|
||||
currAddr = address + PageSize;
|
||||
currSize = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
currSize += PageSize;
|
||||
}
|
||||
|
||||
address += PageSize;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user