mirror of
https://github.com/cryb-to/cryb-to.git
synced 2025-01-03 10:21:10 +00:00
Print hex strings in groups of eight.
This commit is contained in:
parent
33cb3dad6a
commit
25ff8b9664
1 changed files with 6 additions and 2 deletions
|
@ -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, " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue