From c6c427aa3d0e169f597da3a4b5d001d70379c4d0 Mon Sep 17 00:00:00 2001 From: Andrea Date: Fri, 23 Apr 2021 20:34:46 +0100 Subject: [PATCH] Debugger: Fix bound on maximum bytes to move backward. (PR #937) The higher g_nDisasmCurLine the more we will have to travel back to find the instruction at the top of the window. --- source/Debugger/Debugger_Disassembler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Debugger/Debugger_Disassembler.cpp b/source/Debugger/Debugger_Disassembler.cpp index b422216a..8649ac09 100644 --- a/source/Debugger/Debugger_Disassembler.cpp +++ b/source/Debugger/Debugger_Disassembler.cpp @@ -627,7 +627,7 @@ void FormatDisassemblyLine(const DisasmLine_t& line, char* sDisassembly, const i //=========================================================================== void DisasmCalcTopFromCurAddress(bool bUpdateTop) { - int nLen = ((g_nDisasmWinHeight - g_nDisasmCurLine) * 3); // max 3 opcodes/instruction, is our search window + int nLen = g_nDisasmCurLine * 3; // max 3 opcodes/instruction, is our search window // Look for a start address that when disassembled, // will have the cursor on the specified line and address