Permalink
Browse files

Debugger: Fix hang when viewing invalid RAM.

If you end up in disassembly near invalid RAM, bad things were happening,
since hitting bad RAM updates the debugger, which hits bad RAM, which...
  • Loading branch information...
unknownbrackets committed Dec 30, 2017
1 parent ae63628 commit 79a9018aace7501c9392b0b3f2ffdee04081f94a
Showing with 2 additions and 1 deletion.
  1. +2 −1 Windows/Debugger/CtrlDisAsmView.cpp
@@ -228,7 +228,8 @@ bool CtrlDisAsmView::getDisasmAddressText(u32 address, char* dest, bool abbrevia
}
} else {
if (showData) {
sprintf(dest, "%08X %08X", address, Memory::Read_Instruction(address, true).encoding);
u32 encoding = Memory::IsValidAddress(address) ? Memory::Read_Instruction(address, true).encoding : 0;
sprintf(dest, "%08X %08X", address, encoding);
} else {
sprintf(dest, "%08X", address);
}

0 comments on commit 79a9018

Please sign in to comment.