Debugger: fix to wrap 16-bit addr for mem watch (was getting AppleWin debugger crash)

This commit is contained in:
tomcw 2021-03-02 18:14:36 +00:00
parent 2d086e87ec
commit 3766c1e014

View File

@ -3435,7 +3435,7 @@ void DrawWatches (int line)
else
DebuggerSetColorBG( DebuggerGetColor( BG_DATA_2 ));
BYTE nValue8 = (unsigned)*(LPBYTE)(mem + nTarget16 + iByte );
BYTE nValue8 = mem[ (nTarget16 + iByte) & 0xffff ];
sprintf(sText,"%02X", nValue8 );
PrintTextCursorX( sText, rect2 );
}