From fc9ac2e417cf2627b3247e89242bdd15dfc804f1 Mon Sep 17 00:00:00 2001 From: AJR Date: Fri, 15 Jun 2018 14:06:27 -0400 Subject: x2212: Address sanity checking (nw) --- src/devices/machine/x2212.cpp | 2 ++ 1 file changed, 2 insertions(+) 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); } -- cgit v1.2.3