mirror of
https://github.com/holub/mame
synced 2025-04-22 00:11:58 +03:00
315_5124.c: Prevent writing outside the m_selected_sprite array. (nw)
This commit is contained in:
parent
eeaccc5f94
commit
704e073cba
@ -861,7 +861,7 @@ void sega315_5124_device::select_sprites( int line )
|
||||
|
||||
if ((line >= sprite_y) && (line < (sprite_y + m_sprite_height)))
|
||||
{
|
||||
if (m_sprite_count < max_sprites + 1)
|
||||
if (m_sprite_count < max_sprites)
|
||||
{
|
||||
m_selected_sprite[m_sprite_count] = sprite_index;
|
||||
}
|
||||
@ -893,7 +893,7 @@ void sega315_5124_device::select_sprites( int line )
|
||||
|
||||
if ((line >= sprite_y) && (line < (sprite_y + m_sprite_height * m_sprite_zoom)))
|
||||
{
|
||||
if (m_sprite_count < max_sprites + 1)
|
||||
if (m_sprite_count < max_sprites)
|
||||
{
|
||||
m_selected_sprite[m_sprite_count] = sprite_index;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user