Print hex strings in groups of eight.

This commit is contained in:
Dag-Erling Smørgrav 2014-08-02 23:26:20 +00:00 committed by des
parent 33cb3dad6a
commit 25ff8b9664

View file

@ -53,9 +53,13 @@ void
t_verbose_hex(const uint8_t *buf, size_t len) t_verbose_hex(const uint8_t *buf, size_t len)
{ {
if (verbose) if (verbose) {
while (len--) while (len--) {
fprintf(stderr, "%02x", *buf++); fprintf(stderr, "%02x", *buf++);
if (len > 0 && len % 4 == 0)
fprintf(stderr, " ");
}
}
} }
/* /*