summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2015-08-15 03:39:36 +0200
committer hap <happppp@users.noreply.github.com>2015-08-15 03:39:36 +0200
commit0ceb2f6c8eb362afe51dc2e5bf290d1202be9e93 (patch)
treebbfb6626867d2f5f2dfe0d5d0e3990d59d70c005 /src
parenteb1b330bcc5d7bda2d5aaec8b6a5f32d4cef96aa (diff)
fix out of bounds priority check
Diffstat (limited to 'src')
-rw-r--r--src/mame/video/atarimo.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mame/video/atarimo.c b/src/mame/video/atarimo.c
index aeb0e3d6912..df1df174e9e 100644
--- a/src/mame/video/atarimo.c
+++ b/src/mame/video/atarimo.c
@@ -259,12 +259,12 @@ void atari_motion_objects_device::apply_stain(bitmap_ind16 &bitmap, UINT16 *pf,
{
const UINT16 START_MARKER = ((4 << PRIORITY_SHIFT) | 2);
const UINT16 END_MARKER = ((4 << PRIORITY_SHIFT) | 4);
- int offnext = 0;
+ bool offnext = false;
for ( ; x < bitmap.width(); x++)
{
pf[x] |= 0x400;
- if (offnext != 0 && (mo[x] & START_MARKER) != START_MARKER)
+ if (mo[x] == 0xffff || (offnext && (mo[x] & START_MARKER) != START_MARKER))
break;
offnext = ((mo[x] & END_MARKER) == END_MARKER);
}
@@ -541,7 +541,7 @@ void atari_motion_objects_device::render_object(bitmap_ind16 &bitmap, const rect
continue;
// draw the sprite
- gfx->transpen_raw(bitmap,cliprect, code, color, hflip, vflip, sx, sy, m_transpen);
+ gfx->transpen_raw(bitmap,cliprect, code, color, hflip, vflip, sx, sy, m_transpen);
mark_dirty(sx, sx + m_tilewidth - 1, sy, sy + m_tileheight - 1);
}
}
@@ -570,7 +570,7 @@ void atari_motion_objects_device::render_object(bitmap_ind16 &bitmap, const rect
continue;
// draw the sprite
- gfx->transpen_raw(bitmap,cliprect, code, color, hflip, vflip, sx, sy, m_transpen);
+ gfx->transpen_raw(bitmap,cliprect, code, color, hflip, vflip, sx, sy, m_transpen);
mark_dirty(sx, sx + m_tilewidth - 1, sy, sy + m_tileheight - 1);
}
}
@@ -595,8 +595,8 @@ void atari_motion_objects_device::render_object(bitmap_ind16 &bitmap, const rect
atari_motion_objects_device::sprite_parameter::sprite_parameter()
: m_word(0),
- m_shift(0),
- m_mask(0)
+ m_shift(0),
+ m_mask(0)
{
}