diff options
author | Michaël Banaan Ananas <happppp@users.noreply.github.com> | 2013-07-22 23:04:12 +0000 |
---|---|---|
committer | Michaël Banaan Ananas <happppp@users.noreply.github.com> | 2013-07-22 23:04:12 +0000 |
commit | 1669119997fef393232744e3eccc27792898db65 (patch) | |
tree | 9a90aa5f7ca6397db6b32812d2bf94c9d40e6c9c | |
parent | 4f94436201a59a613626bc974dbdd6102db57ecd (diff) |
fix array out of bounds?
-rw-r--r-- | src/mame/video/system1.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mame/video/system1.c b/src/mame/video/system1.c index 1bdb74ed9b6..6ca674ac998 100644 --- a/src/mame/video/system1.c +++ b/src/mame/video/system1.c @@ -514,8 +514,7 @@ void system1_state::video_update_common(screen_device &screen, bitmap_ind16 &bit for (x = cliprect.min_x; x <= cliprect.max_x; x++) { int bgx = ((x - bgxscroll) / 2) & 0x1ff; - assert((x / 2) >= 0 && (x / 2) < 256); - UINT16 fgpix = fgbase[x / 2]; + UINT16 fgpix = fgbase[(x / 2) & 0xff]; UINT16 bgpix = bgbase[bgx >> 8][bgx & 0xff]; UINT16 sprpix = sprbase[x]; UINT8 lookup_index; |