From 3bff05cff7594f353a2d6bf3ee1fdfb1cfd78923 Mon Sep 17 00:00:00 2001 From: AJR Date: Thu, 22 Jun 2017 20:49:20 -0400 Subject: Don't try to read past the end of a memory space in debug view --- src/emu/debug/dvmemory.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/emu/debug/dvmemory.cpp b/src/emu/debug/dvmemory.cpp index e81b33019a1..21db62e5dfd 100644 --- a/src/emu/debug/dvmemory.cpp +++ b/src/emu/debug/dvmemory.cpp @@ -739,11 +739,14 @@ bool debug_view_memory::read(u8 size, offs_t offs, u64 &data) // if no raw data, just use the standard debug routines if (source.m_space != nullptr) { - offs_t dummyaddr = offs; - auto dis = machine().disable_side_effect(); - bool ismapped = m_no_translation ? true : source.m_memintf->translate(source.m_space->spacenum(), TRANSLATE_READ_DEBUG, dummyaddr); + bool ismapped = offs <= m_maxaddr; + if (ismapped && !m_no_translation) + { + offs_t dummyaddr = offs; + ismapped = source.m_memintf->translate(source.m_space->spacenum(), TRANSLATE_READ_DEBUG, dummyaddr); + } data = ~u64(0); if (ismapped) { -- cgit v1.2.3