hcidump: Fix spaces for extended dump

This commit is contained in:
Marcel Holtmann 2004-09-12 18:09:39 +00:00
parent 3ff0c36a8a
commit 8f7a3917a2

View File

@ -156,10 +156,9 @@ void ext_dump(int level, struct frame *frm, int num)
size = num > 16 ? 16 : num;
for (i = 0; i < size; i++)
printf("%02x ", buf[i]);
printf("%02x%s", buf[i], (i + 1) % 8 ? " " : " ");
for (i = 0; i < 16 - size; i++)
printf(" ");
printf(" ");
printf(" %s", (i + 1) % 8 ? " " : " ");
for (i = 0; i < size; i++)
printf("%1c", isprint(buf[i]) ? buf[i] : '.');