From 5886b9e157404346d31e999752b1a68e5bda844b Mon Sep 17 00:00:00 2001 From: Jay Oster Date: Fri, 13 Sep 2024 00:59:01 -0700 Subject: [PATCH] Fix "OVERFLOW" byte not being shown at address $FFFF. --- src/drivers/win/debugger.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/win/debugger.cpp b/src/drivers/win/debugger.cpp index 2ae4c47d..c5b48e6b 100644 --- a/src/drivers/win/debugger.cpp +++ b/src/drivers/win/debugger.cpp @@ -687,7 +687,7 @@ void Disassemble(HWND hWnd, int id, int scrollid, unsigned int addr) { if ((addr + size) > 0xFFFF) { - while (addr < 0xFFFF) + while (addr <= 0xFFFF) { swprintf(chr, L"%02X OVERFLOW\n", GetMem(addr++)); wcscat(debug_wstr, chr); @@ -1901,7 +1901,7 @@ BOOL CALLBACK IDC_DEBUGGER_DISASSEMBLY_WndProc(HWND hwndDlg, UINT uMsg, WPARAM w if (GetNesFileAddress(i) == -1) sprintf(str,"CPU Address $%04X, Error retreiving ROM File Address!",i); else - sprintf(str,"CPU Address %02X:%04X, Offset 0x%06X in file \"%.40s%s\" (NL file: %X)",getBank(i),i,GetNesFileAddress(i),ptr,dotdot,getBank(i)); + sprintf(str,"CPU Address %02X:%04X, Offset 0x%06X in file \"%.40s%s\"",getBank(i),i,GetNesFileAddress(i),ptr,dotdot); SetDlgItemText(hDebug, IDC_DEBUGGER_ADDR_LINE,str); } else {