added assert for index out-of-bounds access in z8536_device::external_port_w() with apple3 (nw)

This commit is contained in:
Oliver Stöneberg 2014-10-23 09:31:42 +02:00
parent a1f5e051ca
commit 16acc5d961

View file

@ -828,6 +828,7 @@ void z8536_device::external_port_w(int port, int bit, int state)
case PORT_A:
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)];
if (!BIT(ddr, bit)) return;