summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2017-04-28 00:20:10 +1000
committer Robbbert <Robbbert@users.noreply.github.com>2017-04-28 00:20:10 +1000
commit820504f8f36e5d69cb791575c62b4b412808df30 (patch)
treea7080943598ac4986c84935892e2c9d00d97a061
parentcdaacfdcb0ba79b0a20fa5f7027c64a542b4d260 (diff)
MT 06547:
-rw-r--r--src/mame/drivers/tv990.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mame/drivers/tv990.cpp b/src/mame/drivers/tv990.cpp
index a8f093c087b..35a221e2689 100644
--- a/src/mame/drivers/tv990.cpp
+++ b/src/mame/drivers/tv990.cpp
@@ -177,6 +177,9 @@ WRITE16_MEMBER(tv990_state::tvi1111_w)
if(!m_rowh)
m_rowh = 16;
m_height = (tvi1111_regs[0xa] - tvi1111_regs[0x9]) / m_rowh;
+ // m_height can be 0 or -1 while machine is starting, leading to a crash on a debug build, so we sanitise it.
+ if(m_height < 8 || m_height > 99)
+ m_height = 0x1a;
m_screen->set_visible_area(0, m_width * 16 - 1, 0, m_height * m_rowh - 1);
}
if(offset == 0x17)