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 |................
This commit is contained in:
Thomas Bernard 2019-12-05 11:26:59 +01:00
parent 5b264e876d
commit fea7ac6a3c
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C

View File

@ -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';