From 96fea7d2fa17a01e56c616e4eb4c27c4e87182cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Mon, 28 Jul 2014 07:28:22 +0000 Subject: [PATCH] added assert for index out-of-bounds with saturneu -cart test1f (nw) --- src/emu/video/stvvdp2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/emu/video/stvvdp2.c b/src/emu/video/stvvdp2.c index de75439955c..c5416f0bb49 100644 --- a/src/emu/video/stvvdp2.c +++ b/src/emu/video/stvvdp2.c @@ -6046,6 +6046,7 @@ int saturn_state::get_vcounter( void ) return (vcount & ~1) | (machine().first_screen()->frame_number() & 1); /* docs says << 1, but according to HW tests it's a typo. */ + assert((vcount & 0x1ff) < ARRAY_LENGTH(true_vcount)); return (true_vcount[vcount & 0x1ff][STV_VDP2_VRES]); // Non-interlace }