GB Cheats: Fix null pointer deref

This commit is contained in:
Jeffrey Pfau 2016-09-17 11:03:40 -07:00
parent a510ae8d86
commit 0298f25ea4
1 changed files with 1 additions and 1 deletions

View File

@ -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)) {