Skip to content

Commit

Permalink
Merge pull request #756 from parasyte/fix/debugger-overflow
Browse files Browse the repository at this point in the history
Fix "OVERFLOW" byte not being shown at address $FFFF.
  • Loading branch information
thor2016 authored Nov 24, 2024
2 parents 3c8e0a0 + 5886b9e commit 6dc277a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/drivers/win/debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
{
Expand Down

0 comments on commit 6dc277a

Please sign in to comment.