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:
parent
5b264e876d
commit
fea7ac6a3c
@ -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';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user