From fea7ac6a3c80cbb946ab488687309c6db3807bfa Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Thu, 5 Dec 2019 11:26:59 +0100 Subject: [PATCH] improve output of GFX2_LogHexDump() add a space between the 8th and the 9th byte. old: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f | ................ new: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f |................ --- src/gfx2log.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gfx2log.c b/src/gfx2log.c index 1f7c16e4..65b6611e 100644 --- a/src/gfx2log.c +++ b/src/gfx2log.c @@ -100,15 +100,18 @@ extern void GFX2_LogHexDump(GFX2_Log_priority_T priority, const char * header, c if (r < 0) return; p += r; + if (i == 7) + line[p++] = ' '; } if (i < 16) { + if (i < 7) + line[p++] = ' '; memset(line + p, ' ', 3 * (16 - i)); p += 3 * (16 - i); } line[p++] = ' '; line[p++] = '|'; - line[p++] = ' '; for (i = 0; i < count && i < 16; i++) line[p++] = data[offset+i]>=32 && data[offset+i]<127 ? data[offset+i] : '.'; line[p++] = '\0';