mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
added assert for index out-of-bounds access in z8536_device::external_port_w() with apple3 (nw)
This commit is contained in:
parent
a1f5e051ca
commit
16acc5d961
1 changed files with 1 additions and 0 deletions
|
@ -828,6 +828,7 @@ void z8536_device::external_port_w(int port, int bit, int state)
|
||||||
case PORT_A:
|
case PORT_A:
|
||||||
case PORT_B:
|
case PORT_B:
|
||||||
{
|
{
|
||||||
|
assert((PORT_A_DATA_DIRECTION + (port << 3)) >= 0 && (PORT_A_DATA_DIRECTION + (port << 3)) < ARRAY_LENGTH(m_register));
|
||||||
UINT8 ddr = m_register[PORT_A_DATA_DIRECTION + (port << 3)];
|
UINT8 ddr = m_register[PORT_A_DATA_DIRECTION + (port << 3)];
|
||||||
|
|
||||||
if (!BIT(ddr, bit)) return;
|
if (!BIT(ddr, bit)) return;
|
||||||
|
|
Loading…
Reference in a new issue