diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2017-06-22 20:49:20 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2017-06-22 20:50:04 -0400 |
commit | 3bff05cff7594f353a2d6bf3ee1fdfb1cfd78923 (patch) | |
tree | 9203ded0870b7867de768f785697c6e64de5e5be | |
parent | 14ee94a1fe9f360c9f972961e3fd0907c3b39e97 (diff) |
Don't try to read past the end of a memory space in debug view
-rw-r--r-- | src/emu/debug/dvmemory.cpp | 9 |
1 files 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) { |