sharkdp / hexyl

A command-line hex viewer
Apache License 2.0
8.93k stars 227 forks source link

Wrong hexdump #62

Closed tbu- closed 5 years ago

tbu- commented 5 years ago
$ printf "%32s" a | hexyl
┌────────┬─────────────────────────┬─────────────────────────┬────────┬────────┐
│00000000│ 20 20 20 20 20 20 20 20 ┊ 20 20 20 20 20 20 20 20 │        ┊        │
│*       │                         ┊                         │        ┊        │
│00000020│                         ┊                         │        ┊        │
└────────┴─────────────────────────┴─────────────────────────┴────────┴────────┘
$ printf "%32s" a | hexdump -C
00000000  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000010  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 61  |               a|
00000020
sharkdp commented 5 years ago

Thank you for reporting this.

That definitely looks like a bug in the squeezing functionality.

(the * on the left-hand side indicates that some of the output has been suppressed. Use the -v/--no-squeezing option if you want to avoid this.)

@awidegreen Do you maybe have time to look into this?

awidegreen commented 5 years ago

@sharkdp sure, I'll have a look