mirror of
https://github.com/libretro/bsnes-libretro.git
synced 2024-11-23 17:09:44 +00:00
Correct emulation of count overflow in ATTR_CHR, fixes #372
This commit is contained in:
parent
f24489b983
commit
0c5e15b49d
@ -269,7 +269,8 @@ static void command_ready(GB_gameboy_t *gb)
|
||||
#endif
|
||||
uint8_t x = command->x;
|
||||
uint8_t y = command->y;
|
||||
if (x >= 20 || y >= 18 || (count + 3) / 4 > sizeof(gb->sgb->command) - sizeof(*command) - 1) {
|
||||
count = MIN(count, 20 * 18);
|
||||
if (x >= 20 || y >= 18) {
|
||||
/* TODO: Verify with the SFC BIOS */
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user