This is an automated email from the ASF dual-hosted git repository. jerzy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit bd96d0619a0202ce4d6e0c1e76526baaa1faeef7 Author: Jerzy Kasenberg <[email protected]> AuthorDate: Wed Apr 3 11:33:27 2024 +0200 log_console: Fix image header log print console print was using series of hexadecimal formatting without specifying filed size it could result in misleading printout where leading zeros for each byte are missing. Now format makes sure that all digits are present. Signed-off-by: Jerzy Kasenberg <[email protected]> --- sys/log/full/src/log_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/log/full/src/log_console.c b/sys/log/full/src/log_console.c index 69017f0d1..5905f8d1f 100644 --- a/sys/log/full/src/log_console.c +++ b/sys/log/full/src/log_console.c @@ -57,7 +57,7 @@ log_console_print_hdr(const struct log_entry_hdr *hdr) hdr->ue_ts, hdr->ue_module, hdr->ue_level); if (hdr->ue_flags & LOG_FLAGS_IMG_HASH) { - console_printf("ih=0x%x%x%x%x", hdr->ue_imghash[0], hdr->ue_imghash[1], + console_printf("ih=0x%02x%02x%02x%02x", hdr->ue_imghash[0], hdr->ue_imghash[1], hdr->ue_imghash[2], hdr->ue_imghash[3]); } console_printf("]");
