Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong hexdump #62

Closed
tbu- opened this issue May 23, 2019 · 2 comments · Fixed by #64
Closed

Wrong hexdump #62

tbu- opened this issue May 23, 2019 · 2 comments · Fixed by #64
Labels
bug Something isn't working

Comments

@tbu-
Copy link

tbu- commented May 23, 2019

$ 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
Copy link
Owner

sharkdp commented May 28, 2019

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?

@sharkdp sharkdp added the bug Something isn't working label May 28, 2019
@awidegreen
Copy link
Contributor

@sharkdp sure, I'll have a look

awidegreen added a commit to awidegreen/hexyl that referenced this issue May 29, 2019
Consider equality for first and last character of a line.

If the first or last character of a line is not equal to previous character,
the state machine should be set back to probe as the line should not be
squeezed.

The unit tests has been expanded for testing the use case described in sharkdp#62.
Further the body of all unit tests has been simplified.

Fixes sharkdp#62
sharkdp pushed a commit that referenced this issue May 30, 2019
Consider equality for first and last character of a line.

If the first or last character of a line is not equal to previous character,
the state machine should be set back to probe as the line should not be
squeezed.

The unit tests has been expanded for testing the use case described in #62.
Further the body of all unit tests has been simplified.

Fixes #62
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants