summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/z8536.c
diff options
context:
space:
mode:
author Oliver Stöneberg <oliverst@online.de>2014-10-23 09:31:42 +0200
committer Oliver Stöneberg <oliverst@online.de>2014-10-23 09:31:42 +0200
commit16acc5d9619de75e3e67bd6631e10f4b2a734559 (patch)
tree506becb5d3ba1649e5166297a4190b6f1ff0a9a0 /src/emu/machine/z8536.c
parenta1f5e051caa54dad35aa99a96e6a29952dc752f3 (diff)
added assert for index out-of-bounds access in z8536_device::external_port_w() with apple3 (nw)
Diffstat (limited to 'src/emu/machine/z8536.c')
-rw-r--r--src/emu/machine/z8536.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/emu/machine/z8536.c b/src/emu/machine/z8536.c
index c1393b2988d..a497f3aefc4 100644
--- a/src/emu/machine/z8536.c
+++ b/src/emu/machine/z8536.c
@@ -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;