mirror of
https://github.com/holub/mame
synced 2025-05-18 03:35:03 +03:00
added asserts for index out-of-bounds accesses with wmbullet -flop cpm22 (nw)
This commit is contained in:
parent
dd71fc9777
commit
34dd10fbdd
@ -595,8 +595,10 @@ UINT8 z80dma_device::read()
|
|||||||
|
|
||||||
if(m_read_num_follow == 0) // special case: Legend of Kage on X1 Turbo
|
if(m_read_num_follow == 0) // special case: Legend of Kage on X1 Turbo
|
||||||
res = m_status;
|
res = m_status;
|
||||||
else
|
else {
|
||||||
|
assert(m_read_cur_follow < ARRAY_LENGTH(m_read_regs_follow));
|
||||||
res = m_read_regs_follow[m_read_cur_follow];
|
res = m_read_regs_follow[m_read_cur_follow];
|
||||||
|
}
|
||||||
|
|
||||||
m_read_cur_follow++;
|
m_read_cur_follow++;
|
||||||
|
|
||||||
@ -686,6 +688,7 @@ void z80dma_device::write(UINT8 data)
|
|||||||
case COMMAND_READ_STATUS_BYTE:
|
case COMMAND_READ_STATUS_BYTE:
|
||||||
if (LOG) logerror("Z80DMA '%s' CMD Read status Byte\n", tag());
|
if (LOG) logerror("Z80DMA '%s' CMD Read status Byte\n", tag());
|
||||||
READ_MASK = 1;
|
READ_MASK = 1;
|
||||||
|
assert(m_read_num_follow < ARRAY_LENGTH(m_read_regs_follow));
|
||||||
m_read_regs_follow[m_read_num_follow++] = m_status;
|
m_read_regs_follow[m_read_num_follow++] = m_status;
|
||||||
break;
|
break;
|
||||||
case COMMAND_RESET_AND_DISABLE_INTERRUPTS:
|
case COMMAND_RESET_AND_DISABLE_INTERRUPTS:
|
||||||
|
Loading…
Reference in New Issue
Block a user