From 28da71b8bb0fdb365bf923449c2f75810bb90537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Sun, 10 Aug 2014 03:30:31 +0000 Subject: [PATCH] fixed index out-of-bounds access in asic65_device::read() (nw) --- src/mame/machine/asic65.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mame/machine/asic65.c b/src/mame/machine/asic65.c index 0aaa1c86b64..92346637974 100644 --- a/src/mame/machine/asic65.c +++ b/src/mame/machine/asic65.c @@ -239,7 +239,6 @@ WRITE16_MEMBER( asic65_device::data_w ) READ16_MEMBER( asic65_device::read ) { - int command = (m_command < MAX_COMMANDS) ? command_map[m_asic65_type][m_command] : OP_UNKNOWN; INT64 element, result64 = 0; UINT16 result = 0; @@ -251,6 +250,8 @@ READ16_MEMBER( asic65_device::read ) return m_68data; } + int command = (m_command < MAX_COMMANDS) ? command_map[m_asic65_type][m_command] : OP_UNKNOWN; + /* update results */ switch (command) {