Replace sprintf() with StrFormat() (PR #1048)

This commit is contained in:
Kelvin Lee
2022-03-03 08:10:41 +11:00
committed by GitHub
parent 80f3eaeb91
commit dfb8802763
8 changed files with 99 additions and 111 deletions
+3 -4
View File
@@ -84,11 +84,10 @@ void SSI_Output(void)
int ssi2 = ssiRegs[SSI_RATEINF];
LogOutput("SSI: ");
for (int i=0; i<=4; i++)
for (int i = 0; i <= 4; i++)
{
char r[3]="--";
if (ssiRegs[i]>=0) sprintf(r,"%02X",ssiRegs[i]);
LogOutput("%s ", r);
std::string r = (ssiRegs[i] >= 0) ? StrFormat("%02X", ssiRegs[i]) : "--";
LogOutput("%s ", r.c_str());
ssiRegs[i] = -1;
}