Skip to content

Commit

Permalink
apply bit mask for two value search too
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvita committed Nov 18, 2021
1 parent e5b7924 commit 0710926
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions source/guis/gui_cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5659,6 +5659,9 @@ void GuiCheats::searchMemoryAddressesPrimary(Debugger *debugger, searchValue_t s
if (realValue._s64 == searchValue1._s64) {
memset(&nextValue, 0, 8);
memcpy(&nextValue, buffer + i + dataTypeSizes[searchType], dataTypeSizes[searchType]);
if (Config::getConfig()->use_bitmask) {
nextValue._u64 = Config::getConfig()->bitmask & nextValue._u64;
}
if (nextValue._s64 == searchValue2._s64){
(*displayDump)->addData((u8 *)&address, sizeof(u64));
helperinfo.count++;
Expand All @@ -5672,6 +5675,9 @@ void GuiCheats::searchMemoryAddressesPrimary(Debugger *debugger, searchValue_t s
if ((k != 0) && (i + k * dataTypeSizes[searchType] >= 0) && (i + k * dataTypeSizes[searchType] + dataTypeSizes[searchType] <= bufferSize)) {
memset(&nextValue, 0, 8);
memcpy(&nextValue, buffer + i + k * dataTypeSizes[searchType], dataTypeSizes[searchType]);
if (Config::getConfig()->use_bitmask) {
nextValue._u64 = Config::getConfig()->bitmask & nextValue._u64;
}
if (nextValue._s64 == searchValue2._s64) {
(*displayDump)->addData((u8 *)&address, sizeof(u64));
helperinfo.count++;
Expand Down Expand Up @@ -5973,6 +5979,9 @@ void GuiCheats::searchMemoryAddressesSecondary(Debugger *debugger, searchValue_t
if (value._s64 == searchValue1._s64) {
memset(&nextValue, 0, 8);
memcpy(&nextValue, ram_buffer + address - helperinfo.address + dataTypeSizes[searchType], dataTypeSizes[searchType]);
if (Config::getConfig()->use_bitmask) {
nextValue._u64 = Config::getConfig()->bitmask & nextValue._u64;
}
if (nextValue._s64 == searchValue2._s64){
newDump->addData((u8 *)&address, sizeof(u64));
newhelperinfo.count++;
Expand All @@ -5988,6 +5997,9 @@ void GuiCheats::searchMemoryAddressesSecondary(Debugger *debugger, searchValue_t
// if (k != 0) {
memset(&nextValue, 0, 8);
memcpy(&nextValue, ram_buffer + address - helperinfo.address + k * dataTypeSizes[searchType], dataTypeSizes[searchType]);
if (Config::getConfig()->use_bitmask) {
nextValue._u64 = Config::getConfig()->bitmask & nextValue._u64;
}
if (nextValue._s64 == searchValue2._s64) {
newDump->addData((u8 *)&address, sizeof(u64));
newhelperinfo.count++;
Expand Down

0 comments on commit 0710926

Please sign in to comment.