all repos — mgba @ eff48a77f1760287a74c6a5040f624c0fbe207a0

mGBA Game Boy Advance Emulator

Core: Fix memory search for wide values
Vicki Pfau vi@endrift.com
Sun, 11 Jun 2017 14:40:48 -0700
commit

eff48a77f1760287a74c6a5040f624c0fbe207a0

parent

bd30fbeb8188dbab52be8601536a06eea4753b0b

1 files changed, 4 insertions(+), 4 deletions(-)

jump to
M src/core/mem-search.csrc/core/mem-search.c

@@ -387,10 +387,10 @@ if (end) {

if (core->rawRead8(core, res->address, res->segment) * res->guessDivisor == value) { return true; } - if ((!res->address & 1) && core->rawRead16(core, res->address, res->segment) * res->guessDivisor == value) { + if (!(res->address & 1) && core->rawRead16(core, res->address, res->segment) * res->guessDivisor == value) { return true; } - if ((!res->address & 3) && core->rawRead32(core, res->address, res->segment) * res->guessDivisor == value) { + if (!(res->address & 3) && core->rawRead32(core, res->address, res->segment) * res->guessDivisor == value) { return true; } }

@@ -400,10 +400,10 @@ if (end) {

if (core->rawRead8(core, res->address, res->segment) * res->guessDivisor == value) { return true; } - if ((!res->address & 1) && core->rawRead16(core, res->address, res->segment) * res->guessDivisor == value) { + if (!(res->address & 1) && core->rawRead16(core, res->address, res->segment) * res->guessDivisor == value) { return true; } - if ((!res->address & 3) && core->rawRead32(core, res->address, res->segment) * res->guessDivisor == value) { + if (!(res->address & 3) && core->rawRead32(core, res->address, res->segment) * res->guessDivisor == value) { return true; } }