From a7a07661f741aaca145ab580ec38d2a00ae8c03a Mon Sep 17 00:00:00 2001 From: tomvita <68505331+tomvita@users.noreply.github.com> Date: Sun, 27 Sep 2020 20:22:52 +0800 Subject: [PATCH] mask out zero and pointers from DIFF search --- source/guis/gui_cheats.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/guis/gui_cheats.cpp b/source/guis/gui_cheats.cpp index 54c6a208..ed195f72 100644 --- a/source/guis/gui_cheats.cpp +++ b/source/guis/gui_cheats.cpp @@ -4231,7 +4231,7 @@ void GuiCheats::searchMemoryValuesSecondary(Debugger *debugger, searchType_t sea } break; case SEARCH_MODE_DIFF: - if (newValue._u64 != oldValue._u64) + if ((newValue._u64 != oldValue._u64) && (newValue._u64 <= m_heapBaseAddr || newValue._u64 >= (m_heapEnd)) && (newValue._u64 != 0)) { addrDump->addData((u8 *)&addr, sizeof(u64)); newMemDump->addData((u8 *)&newValue, sizeof(u64)); @@ -4587,7 +4587,7 @@ void GuiCheats::searchMemoryValuesTertiary(Debugger *debugger, searchValue_t sea } break; case SEARCH_MODE_DIFF: - if (value._s64 != oldvalue._s64) + if ((value._s64 != oldvalue._s64) && (value._u64 <= m_heapBaseAddr || value._u64 >= (m_heapEnd)) && (value._u64 != 0)) { newDump->addData((u8 *)&address, sizeof(u64)); newvalueDump->addData((u8 *)&value, sizeof(u64));