summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/x2212.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-06-15 14:06:27 -0400
committer AJR <ajrhacker@users.noreply.github.com>2018-06-15 14:06:27 -0400
commitfc9ac2e417cf2627b3247e89242bdd15dfc804f1 (patch)
treeb8253fef73dc1c7289786e5c6604d36f8cbb1148 /src/devices/machine/x2212.cpp
parent9adf39ca97cc006f67023667c42f449edf29df5f (diff)
x2212: Address sanity checking (nw)
Diffstat (limited to 'src/devices/machine/x2212.cpp')
-rw-r--r--src/devices/machine/x2212.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/devices/machine/x2212.cpp b/src/devices/machine/x2212.cpp
index ab3adce12a6..c9738d69aa1 100644
--- a/src/devices/machine/x2212.cpp
+++ b/src/devices/machine/x2212.cpp
@@ -138,6 +138,7 @@ void x2212_device::do_recall()
WRITE8_MEMBER( x2212_device::write )
{
+ assert(offset < m_size_data);
m_sram[offset] = data & 0x0f;
}
@@ -148,6 +149,7 @@ WRITE8_MEMBER( x2212_device::write )
READ8_MEMBER( x2212_device::read )
{
+ assert(offset < m_size_data);
return (m_sram[offset] & 0x0f) | (space.unmap() & 0xf0);
}