all repos — mgba @ 0298f25ea46b0eb0901becf0e9a6b478223fe39d

mGBA Game Boy Advance Emulator

GB Cheats: Fix null pointer deref
Jeffrey Pfau jeffrey@endrift.com
Sat, 17 Sep 2016 11:03:40 -0700
commit

0298f25ea46b0eb0901becf0e9a6b478223fe39d

parent

a510ae8d8650b7d0fd32832a3236c37b5e25c0f6

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

jump to
M src/gb/cheats.csrc/gb/cheats.c

@@ -177,7 +177,7 @@ static bool GBCheatAddVBALine(struct GBCheatSet* cheats, const char* line) {

uint16_t address; uint8_t value; const char* lineNext = hex16(line, &address); - if (!lineNext && lineNext[0] != ':') { + if (!lineNext || lineNext[0] != ':') { return false; } if (!hex8(line, &value)) {