GB Cheats: Fix null pointer deref
Jeffrey Pfau jeffrey@endrift.com
Sat, 17 Sep 2016 11:03:40 -0700
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/gb/cheats.c
→
src/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)) {