Debugger: replace sprintf() part 2 (PR #1085)

This commit is contained in:
Kelvin Lee
2022-04-17 20:40:21 +10:00
committed by GitHub
parent a5e8ee31a3
commit 494aaa04c0
4 changed files with 36 additions and 45 deletions

View File

@@ -767,13 +767,12 @@ void DisasmCalcTopFromCurAddress(bool bUpdateTop)
// Moving the cursor line around is not really a good idea, since we're breaking consistency paradigm for the user.
// g_nDisasmCurLine = 0;
#if 0 // _DEBUG
TCHAR sText[CONSOLE_WIDTH * 2];
sprintf(sText, TEXT("DisasmCalcTopFromCurAddress()\n"
"\tTop: %04X\n"
"\tLen: %04X\n"
"\tMissed: %04X"),
std::string sText = StrFormat("DisasmCalcTopFromCurAddress()\n"
"\tTop: %04X\n"
"\tLen: %04X\n"
"\tMissed: %04X",
g_nDisasmCurAddress - nLen, nLen, g_nDisasmCurAddress);
GetFrame().FrameMessageBox(sText, "ERROR", MB_OK);
GetFrame().FrameMessageBox(sText.c_str(), "ERROR", MB_OK);
#endif
}
}