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.
This commit is contained in:
Andrea 2021-04-23 20:34:46 +01:00 committed by GitHub
parent 6fefce553a
commit c6c427aa3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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