mirror of
https://github.com/holub/mame
synced 2025-05-17 19:24:59 +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
|
||||
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];
|
||||
}
|
||||
|
||||
m_read_cur_follow++;
|
||||
|
||||
@ -686,6 +688,7 @@ void z80dma_device::write(UINT8 data)
|
||||
case COMMAND_READ_STATUS_BYTE:
|
||||
if (LOG) logerror("Z80DMA '%s' CMD Read status Byte\n", tag());
|
||||
READ_MASK = 1;
|
||||
assert(m_read_num_follow < ARRAY_LENGTH(m_read_regs_follow));
|
||||
m_read_regs_follow[m_read_num_follow++] = m_status;
|
||||
break;
|
||||
case COMMAND_RESET_AND_DISABLE_INTERRUPTS:
|
||||
|
Loading…
Reference in New Issue
Block a user