mirror of
https://github.com/holub/mame
synced 2025-05-29 17:13:05 +03:00
gb_lcd.c: Fix another index out of bound access in the supergb driver (nw)
This commit is contained in:
parent
f9a8a749f4
commit
6b8acd5d5b
@ -793,7 +793,8 @@ void sgb_lcd_device::update_sprites()
|
|||||||
data = (vram[adr + 1] << 8) | vram[adr];
|
data = (vram[adr + 1] << 8) | vram[adr];
|
||||||
|
|
||||||
/* Find the palette to use */
|
/* Find the palette to use */
|
||||||
pal = m_sgb_pal_map[(xindex >> 3)][((yindex - SGB_YOFFSET) >> 3)] << 2;
|
// If sprite started before the start of the line we may need to pick a different pal_map entry?
|
||||||
|
pal = m_sgb_pal_map[(xindex < 0) ? 0 : (xindex >> 3)][((yindex - SGB_YOFFSET) >> 3)] << 2;
|
||||||
|
|
||||||
/* Offset to center of screen */
|
/* Offset to center of screen */
|
||||||
xindex += SGB_XOFFSET;
|
xindex += SGB_XOFFSET;
|
||||||
|
Loading…
Reference in New Issue
Block a user