From 26b46a7330122a6cd8d09adbbcfae08247247d45 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 15 Jan 2024 17:27:12 +0100 Subject: [PATCH] adapt text output when parsing json files and detecting there is no more blocks to load --- client/src/fileutils.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/src/fileutils.c b/client/src/fileutils.c index 8f8b77f63..3e2a2b143 100644 --- a/client/src/fileutils.c +++ b/client/src/fileutils.c @@ -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; }