summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar AJR <ajrhacker@users.noreply.github.com>2020-02-25 16:21:27 -0500
committerGravatarGravatar AJR <ajrhacker@users.noreply.github.com>2020-02-25 16:21:29 -0500
commite35907e54e0863a807ae3445ed68615e4d03f294 (patch) (github)
tree49864c05ae28b7707f037b44b5581250956b44c1
parenta74e8df5e05d0ecf0fda95491e354888fd8c62c3 (diff)
downloadmame-e35907e54e0863a807ae3445ed68615e4d03f294.tar.bz2
mame-e35907e54e0863a807ae3445ed68615e4d03f294.zip
i8279: Fix accidentally uncovered crash in turbo (nw)
This device emulation is anything but robust.
-rw-r--r--src/devices/machine/i8279.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/devices/machine/i8279.cpp b/src/devices/machine/i8279.cpp
index c030bae7b1d..12f2a7cd6dd 100644
--- a/src/devices/machine/i8279.cpp
+++ b/src/devices/machine/i8279.cpp
@@ -277,6 +277,10 @@ void i8279_device::timer_mainloop()
bool ctrl_key = 1;
bool strobe_pulse = 0;
+ // hack to prevent infinite loops
+ if (decoded && m_scanner == 0)
+ m_scanner = 1;
+
// keyboard
// type 0 = kbd, 2-key lockout
// type 1 = kdb, n-key