mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
CHG: PrintAndLogEx, prints prefixes on without the \n in string
This commit is contained in:
parent
f5257f5380
commit
fcad4054b6
1 changed files with 10 additions and 3 deletions
11
client/ui.c
11
client/ui.c
|
@ -80,6 +80,12 @@ void PrintAndLogEx(logLevel_t level, char *fmt, ...) {
|
|||
vsnprintf(buffer, sizeof(buffer), fmt, args);
|
||||
va_end(args);
|
||||
|
||||
// no prefixes for normal
|
||||
if ( level == NORMAL ) {
|
||||
PrintAndLog(buffer);
|
||||
return;
|
||||
}
|
||||
|
||||
if (strchr(buffer, '\n')) {
|
||||
|
||||
token = strtok(buffer, "\n");
|
||||
|
@ -94,9 +100,10 @@ void PrintAndLogEx(logLevel_t level, char *fmt, ...) {
|
|||
token = strtok(NULL, "\n");
|
||||
}
|
||||
PrintAndLog(buffer2);
|
||||
} else {
|
||||
snprintf(buffer2, sizeof(buffer2), "%s%s", prefix, buffer);
|
||||
PrintAndLog(buffer2);
|
||||
}
|
||||
else
|
||||
PrintAndLog(buffer);
|
||||
}
|
||||
|
||||
void PrintAndLog(char *fmt, ...) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue