From 0298f25ea46b0eb0901becf0e9a6b478223fe39d Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sat, 17 Sep 2016 11:03:40 -0700 Subject: [PATCH] GB Cheats: Fix null pointer deref --- src/gb/cheats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gb/cheats.c b/src/gb/cheats.c index 26df5104a..a29711c61 100644 --- a/src/gb/cheats.c +++ b/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)) {