Skip to content

Commit

Permalink
mask out zero and pointers from DIFF search
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvita committed Sep 27, 2020
1 parent 05c75b0 commit a7a0766
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/guis/gui_cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit a7a0766

Please sign in to comment.