mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-15 19:59:34 +08:00
consistent output
This commit is contained in:
parent
cba5d18124
commit
687f7f3697
1 changed files with 3 additions and 6 deletions
|
@ -76,7 +76,7 @@ void AddLogLine(const char *fn, const char *data, const char *c) {
|
||||||
|
|
||||||
f = fopen(filename, "a");
|
f = fopen(filename, "a");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
printf("Could not append log file %s", filename);
|
PrintAndLogEx(ERR, "Could not append log file" _YELLOW_("%s"), filename);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,13 +117,10 @@ void AddLogCurrentDT(const char *fn) {
|
||||||
// param uidlen - length of uid array.
|
// param uidlen - length of uid array.
|
||||||
void FillFileNameByUID(char *filenamePrefix, const uint8_t *uid, const char *ext, const int uidlen) {
|
void FillFileNameByUID(char *filenamePrefix, const uint8_t *uid, const char *ext, const int uidlen) {
|
||||||
if (filenamePrefix == NULL || uid == NULL || ext == NULL) {
|
if (filenamePrefix == NULL || uid == NULL || ext == NULL) {
|
||||||
printf("[!] error parameter is NULL\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int len = 0;
|
int len = strlen(filenamePrefix);
|
||||||
len = strlen(filenamePrefix);
|
|
||||||
//memset(fn, 0x00, FILE_PATH_SIZE);
|
|
||||||
|
|
||||||
for (int j = 0; j < uidlen; j++)
|
for (int j = 0; j < uidlen; j++)
|
||||||
sprintf(filenamePrefix + len + j * 2, "%02X", uid[j]);
|
sprintf(filenamePrefix + len + j * 2, "%02X", uid[j]);
|
||||||
|
@ -623,7 +620,7 @@ int param_getstr(const char *line, int paramnum, char *str, size_t buffersize) {
|
||||||
|
|
||||||
// Prevent out of bounds errors
|
// Prevent out of bounds errors
|
||||||
if (en - bg + 1 >= buffersize) {
|
if (en - bg + 1 >= buffersize) {
|
||||||
printf("out of bounds error: want %d bytes have %zu bytes\n", en - bg + 1 + 1, buffersize);
|
PrintAndLogEx(ERR, "out of bounds error: want %d bytes have %zu bytes\n", en - bg + 1 + 1, buffersize);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue