MemoryWatcher: Do not follow invalid pointers

This commit is contained in:
Pablo Stebler 2020-08-23 16:38:59 +02:00
parent 75b4f70e5e
commit ff168469b7
No known key found for this signature in database
GPG Key ID: 90375E73AC6109CC

View File

@ -70,7 +70,11 @@ u32 MemoryWatcher::ChasePointer(const std::string& line)
{
u32 value = 0;
for (u32 offset : m_addresses[line])
{
value = Memory::Read_U32(value + offset);
if (!PowerPC::HostIsRAMAddress(value))
break;
}
return value;
}