mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-13 10:43:01 +08:00
FIX: printing percentage char is now standard compliant (@fabled)
see https://github.com/iceman1001/proxmark3/pull/272
This commit is contained in:
parent
e3f4ef498f
commit
f23219f3b8
2 changed files with 5 additions and 5 deletions
|
@ -74,7 +74,7 @@ static void lookupChipID(uint32_t iChipID, uint32_t mem_used) {
|
|||
if ( mem_avail > 0 )
|
||||
mem_left = (mem_avail * 1024) - mem_used;
|
||||
|
||||
PrintAndLogEx(NORMAL, " --= Nonvolatile Program Memory Size: %uK bytes, Used: %u bytes (%2.0f\%) Free: %u bytes (%2.0f\%)",
|
||||
PrintAndLogEx(NORMAL, " --= Nonvolatile Program Memory Size: %uK bytes, Used: %u bytes (%2.0f%%) Free: %u bytes (%2.0f%%)",
|
||||
mem_avail,
|
||||
mem_used,
|
||||
mem_avail == 0 ? 0.0f : (float)mem_used/(mem_avail*1024)*100,
|
||||
|
|
|
@ -41,7 +41,7 @@ void PrintAndLogOptions(char *str[][2], size_t size, size_t space) {
|
|||
if (i < size-1)
|
||||
strncat(buff, "\n", sizeof(buff)-strlen(buff) -1);
|
||||
}
|
||||
PrintAndLogEx(NORMAL, buff);
|
||||
PrintAndLogEx(NORMAL, "%s", buff);
|
||||
}
|
||||
void PrintAndLogEx(logLevel_t level, char *fmt, ...) {
|
||||
|
||||
|
@ -85,7 +85,7 @@ void PrintAndLogEx(logLevel_t level, char *fmt, ...) {
|
|||
|
||||
// no prefixes for normal
|
||||
if ( level == NORMAL ) {
|
||||
PrintAndLog(buffer);
|
||||
PrintAndLog("%s", buffer);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -110,10 +110,10 @@ void PrintAndLogEx(logLevel_t level, char *fmt, ...) {
|
|||
|
||||
token = strtok(NULL, delim);
|
||||
}
|
||||
PrintAndLog(buffer2);
|
||||
PrintAndLog("%s", buffer2);
|
||||
} else {
|
||||
snprintf(buffer2, sizeof(buffer2), "%s%s", prefix, buffer);
|
||||
PrintAndLog(buffer2);
|
||||
PrintAndLog("%s", buffer2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue