all repos — mgba @ 96c0d7c413e4e5c8d540e255fcb695f415eaeb52

mGBA Game Boy Advance Emulator

Core: Fix guess search resulting in tons of zeroes
Vicki Pfau vi@endrift.com
Mon, 19 Jun 2017 22:29:20 -0700
commit

96c0d7c413e4e5c8d540e255fcb695f415eaeb52

parent

e118fec1cf5e981a03f7d81941460a4eacc64dce

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

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

@@ -272,7 +272,7 @@ mCoreMemorySearchResultsInit(&tmp, 0);

// Decimal: value = strtoull(valueStr, &end, 10); - if (end) { + if (end && !end[0]) { if (value > 0x10000) { found += _search32(mem, size, block, value, out, limit ? limit - found : 0); } else if (value > 0x100) {

@@ -305,7 +305,7 @@ }

// Hex: value = strtoull(valueStr, &end, 16); - if (end) { + if (end && !end[0]) { if (value > 0x10000) { found += _search32(mem, size, block, value, out, limit ? limit - found : 0); } else if (value > 0x100) {