From 422ef6ae517b15efd8ea8f303b8e0c5970826385 Mon Sep 17 00:00:00 2001 From: "S.J.R. van Schaik" Date: Sat, 11 Mar 2017 13:51:28 +0000 Subject: [PATCH] shell: use uint8_t instead of char for showing bytes --- source/shell.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/shell.c b/source/shell.c index 6335f4e..c69956c 100644 --- a/source/shell.c +++ b/source/shell.c @@ -54,14 +54,14 @@ static void parse_hex(FILE *fp, char *buf, size_t len) static void print_hex_ascii(const char *buf, size_t len) { size_t n, i; - char c; + uint8_t c; for (; len; buf += n, len -= n) { n = min(len, 16); for (i = 0; i < 16; ++i) { c = (i < n) ? buf[i] : 0; - printf("%02x", c); + printf("%x", c); } printf(" ");