mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-07-29 19:19:06 -07:00
adapt text output when parsing json files and detecting there is no more blocks to load
This commit is contained in:
parent
ca21348ff6
commit
26b46a7330
1 changed files with 4 additions and 3 deletions
|
@ -1352,11 +1352,12 @@ int loadFileMCT_safe(const char *preferredName, void **pdata, size_t *datalen) {
|
|||
|
||||
static int load_file_sanity(char *s, uint32_t datalen, int i, size_t len) {
|
||||
if (len == 0) {
|
||||
PrintAndLogEx(WARNING, "WARNING: json %s block %d has zero-length data", s, i);
|
||||
PrintAndLogEx(INFO, "file parsing stopped");
|
||||
PrintAndLogEx(DEBUG, "WARNING: json %s block %d has zero-length data", s, i);
|
||||
PrintAndLogEx(INFO, "File parsing stopped");
|
||||
return false;
|
||||
} else if (len != datalen) {
|
||||
PrintAndLogEx(WARNING, "WARNING: json %s block %d only has %zu bytes, expected %d (will fill with zero data)", s, i, len, datalen);
|
||||
PrintAndLogEx(WARNING, "WARNING: json %s block %d only has %zu bytes", s, i, len);
|
||||
PrintAndLogEx(INFO, "Expected %d - padding with zeros", datalen);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue