Fixed string over-read in win port by added a exit condition for loop in ASM debugger logic.

This commit is contained in:
harry 2023-02-06 21:26:40 -05:00
parent 410810ac18
commit 66e2576595
1 changed files with 1 additions and 1 deletions

View File

@ -481,7 +481,7 @@ void HighlightSyntax(HWND hWnd, int lines)
{
commentline = false;
wordbreak = SendDlgItemMessage(hWnd, IDC_DEBUGGER_DISASSEMBLY, EM_FINDWORDBREAK, (WPARAM)WB_RIGHT, (LPARAM)newline.chrg.cpMin + 21);
for (int ch = newline.chrg.cpMin; ; ch++)
for (int ch = newline.chrg.cpMin; debug_wstr[ch] != 0; ch++)
{
if (debug_wstr[ch] == L'=' || debug_wstr[ch] == L'@' || debug_wstr[ch] == L'\n' || debug_wstr[ch] == L'-' || debug_wstr[ch] == L';')
{