diff --git a/src/mame/drivers/shanghai.c b/src/mame/drivers/shanghai.c index 0868b88e6e6..e454e5c2594 100644 --- a/src/mame/drivers/shanghai.c +++ b/src/mame/drivers/shanghai.c @@ -94,6 +94,8 @@ UINT32 shanghai_state::screen_update_shanghai(screen_device &screen, bitmap_ind1 b &= (HD63484_RAM_SIZE - 1); src = m_hd63484->ram_r(space, b, 0xffff); bitmap.pix16(y, x) = src & 0x00ff; + assert(y >= 0 && y < bitmap.height()); + assert(x >= 0 && x < bitmap.width()); bitmap.pix16(y, x + 1) = (src & 0xff00) >> 8; b++; }