Fix #144 by ignored malformed commands with 0 length

This commit is contained in:
Lior Halphon 2019-06-15 03:42:53 +03:00
parent b2397a2e7a
commit 8b7922b679

View File

@ -98,6 +98,9 @@ static void command_ready(GB_gameboy_t *gb)
return;
}
/* Ignore malformed commands (0 length)*/
if ((gb->sgb->command[0] & 7) == 0) return;
switch (gb->sgb->command[0] >> 3) {
case PAL01:
pal_command(gb, 0, 1);