summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/unsp
diff options
context:
space:
mode:
author David Haywood <28625134+DavidHaywood@users.noreply.github.com>2020-01-31 12:28:35 +0000
committer GitHub <noreply@github.com>2020-01-31 23:28:35 +1100
commit09a34e92eae604e540ebc1cc3a88efa3507511b5 (patch)
tree05a33fdd86d4ab65eda57fc5cfbe04c09723fbc1 /src/devices/cpu/unsp
parent0ca3dc37ed3655b4d26bbb85f0904c7ec3c76211 (diff)
loop around full array in sunplus reset (nw) (#6243)
Diffstat (limited to 'src/devices/cpu/unsp')
-rw-r--r--src/devices/cpu/unsp/unsp.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/cpu/unsp/unsp.cpp b/src/devices/cpu/unsp/unsp.cpp
index ff27f97df62..40b96419e9f 100644
--- a/src/devices/cpu/unsp/unsp.cpp
+++ b/src/devices/cpu/unsp/unsp.cpp
@@ -296,7 +296,7 @@ void unsp_20_device::device_start()
void unsp_device::device_reset()
{
- for (int i = 0; i < m_numregs; i++)
+ for (int i = 0; i < ARRAY_LENGTH(m_core->m_r); i++)
{
if (i < m_numregs)
m_core->m_r[i] = 0;