From ff168469b7e060c7dce1f42f0fb547f8c846ffcd Mon Sep 17 00:00:00 2001 From: Pablo Stebler Date: Sun, 23 Aug 2020 16:38:59 +0200 Subject: [PATCH] MemoryWatcher: Do not follow invalid pointers --- Source/Core/Core/MemoryWatcher.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Core/Core/MemoryWatcher.cpp b/Source/Core/Core/MemoryWatcher.cpp index 656ea6b0e3..e90445143d 100644 --- a/Source/Core/Core/MemoryWatcher.cpp +++ b/Source/Core/Core/MemoryWatcher.cpp @@ -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; }