summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Angelo Salese <angelosa@users.noreply.github.com>2022-04-25 17:02:03 +0200
committer Vas Crabb <vas@vastheman.com>2022-04-26 06:26:37 +1000
commit1bf515ae23a51bd41a73339fd09a8f69d813f6ea (patch)
tree355d046ecd3a8b59bd7cac5fe0d67d2a16839f85
parentf04263796446b5235ee85332a50b2a6788aef148 (diff)
68340tmu.cpp: fix potential crash on mode logging
-rw-r--r--src/devices/machine/68340tmu.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/machine/68340tmu.cpp b/src/devices/machine/68340tmu.cpp
index d66f1f2387c..96157eafc53 100644
--- a/src/devices/machine/68340tmu.cpp
+++ b/src/devices/machine/68340tmu.cpp
@@ -156,7 +156,7 @@ void mc68340_timer_module_device::write(offs_t offset, uint16_t data, uint16_t m
"Period Measurement - not implemented",
"Event Count - not implemented",
"Timer Bypass (Simple Test Method) - not implemented"
- }}[data & REG_CR_MODE_MASK]);
+ }}[(data & REG_CR_MODE_MASK) >> 2]);
LOGTIMER("- OC: %s mode\n", std::array<char const *, 4>{{"Disabled", "Toggle", "Zero", "One"}}[data & REG_CR_OC_MASK]);