mirror of https://github.com/mgba-emu/mgba.git
GB Cheats: Fix null pointer deref
This commit is contained in:
parent
a510ae8d86
commit
0298f25ea4
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue