From 704e073cba248e5b597ed7a660eb341bfc3ce097 Mon Sep 17 00:00:00 2001 From: Wilbert Pol Date: Tue, 27 Aug 2013 19:56:01 +0000 Subject: [PATCH] 315_5124.c: Prevent writing outside the m_selected_sprite array. (nw) --- src/emu/video/315_5124.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emu/video/315_5124.c b/src/emu/video/315_5124.c index 6cf600fe9b8..e61ddddeda0 100644 --- a/src/emu/video/315_5124.c +++ b/src/emu/video/315_5124.c @@ -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; }