From 717153ac19b9b14be5dc982a2ec3c86f5ad1c8e4 Mon Sep 17 00:00:00 2001 From: zeromus Date: Mon, 12 Nov 2018 03:19:07 -0500 Subject: [PATCH] fix hang in symbolic debugger syntax highlighting in rare cases. fixes #18 --- src/drivers/win/debugger.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/drivers/win/debugger.cpp b/src/drivers/win/debugger.cpp index 4e730715..46e5b3fe 100644 --- a/src/drivers/win/debugger.cpp +++ b/src/drivers/win/debugger.cpp @@ -447,6 +447,7 @@ void HighlightSyntax(int lines) SendDlgItemMessage(hDebug, IDC_DEBUGGER_DISASSEMBLY, EM_SETSEL, (WPARAM)newline.chrg.cpMin + 20, (LPARAM)opbreak); int oldline = newline.chrg.cpMin; newline.chrg.cpMin = SendDlgItemMessage(hDebug, IDC_DEBUGGER_DISASSEMBLY, EM_FINDTEXT, (WPARAM)FR_DOWN, (LPARAM)&newline) + 1; + if(newline.chrg.cpMin == 0) break; // symbolic address if (debug_str[newline.chrg.cpMin - 2] == ':') {