From 69ad4d5eca581c9fc81a4d3845eea2338a5f2e51 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 2 Apr 2015 22:10:21 +0300 Subject: [PATCH] cmd-hex: Dump absolute memory address. Seeing zeros is quite confusing - you never know if you mistypes something (there's not even a number format error reporting), or something else. --- utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.c b/utils.c index a58e298..3554218 100644 --- a/utils.c +++ b/utils.c @@ -36,7 +36,7 @@ int serial_print_hex_offset(const void *block, int count, int offset) count += offset; b -= offset; for ( ; offset < count; offset += 16) { - serial_puth(offset, 8); + serial_puth((uint32_t)b + offset, 8); for (byte = 0; byte < 16; byte++) { if (byte == 8)