summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2016-07-07 00:19:15 +1000
committer Robbbert <Robbbert@users.noreply.github.com>2016-07-07 00:19:15 +1000
commitbb15b6725e42abbcdb263a72c879980471d7a2a8 (patch)
treeb49e6aa70be379f1a2856a25bfe6cdb7a80d1cae
parentca952b9cd582c3f3da26f0607aafe2dfb931f010 (diff)
SQ80: fixed crash on exit.
-rw-r--r--src/mame/machine/esqvfd.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mame/machine/esqvfd.cpp b/src/mame/machine/esqvfd.cpp
index a1379238673..a4acad6deaf 100644
--- a/src/mame/machine/esqvfd.cpp
+++ b/src/mame/machine/esqvfd.cpp
@@ -203,6 +203,8 @@ void esq2x40_t::write_char(int data)
// ESQ-1 sends (cursor move) 0xfa 0xYY to mark YY characters as underlined at the current cursor location
if (m_lastchar == 0xfa)
{
+ if ((m_cursx + data) > m_rows)
+ data = m_rows - m_cursx;
for (int i = 0; i < data; i++)
{
m_attrs[m_cursy][m_cursx + i] |= AT_UNDERLINE;