315_5124.c: Prevent writing outside the m_selected_sprite array. (nw)

This commit is contained in:
Wilbert Pol 2013-08-27 19:56:01 +00:00
parent eeaccc5f94
commit 704e073cba

View File

@ -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;
}