Previous 199869 Revisions Next

r31452 Monday 28th July, 2014 at 08:34:04 UTC by Wilbert Pol
gb_lcd.c: Fix another index out of bound access in the supergb driver (nw)
[src/mess/video]gb_lcd.c

trunk/src/mess/video/gb_lcd.c
r31451r31452
793793         data = (vram[adr + 1] << 8) | vram[adr];
794794
795795         /* Find the palette to use */
796         pal = m_sgb_pal_map[(xindex >> 3)][((yindex - SGB_YOFFSET) >> 3)] << 2;
796         // If sprite started before the start of the line we may need to pick a different pal_map entry?
797         pal = m_sgb_pal_map[(xindex < 0) ? 0 : (xindex >> 3)][((yindex - SGB_YOFFSET) >> 3)] << 2;
797798
798799         /* Offset to center of screen */
799800         xindex += SGB_XOFFSET;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team