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

Incorrect display of offset in last line #238

Open
gralpli opened this issue Jan 20, 2025 · 1 comment · May be fixed by #239
Open

Incorrect display of offset in last line #238

gralpli opened this issue Jan 20, 2025 · 1 comment · May be fixed by #239
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@gralpli
Copy link

gralpli commented Jan 20, 2025

Output of Hexyl 0.16.0 for this demo file:

┌────────┬─────────────────────────┬─────────────────────────┬────────┬────────┐
│00000000│ 41 41 41 41 41 41 41 41 ┊ 41 41 41 41 41 41 41 41 │AAAAAAAA┊AAAAAAAA│
│00000010│ 42 42 42 42 42 42 42 42 ┊ 42 42 42 42 42 42 42 42 │BBBBBBBB┊BBBBBBBB│
│*       │ 43 43 43 43             ┊                         │CCCC    ┊        │
└────────┴─────────────────────────┴─────────────────────────┴────────┴────────┘

Hexyl should display the offset 00000020 instead of * in the last line. This is a regression compared to Hexyl 0.8.0.

Output of Hexyl 0.8.0:

┌────────┬─────────────────────────┬─────────────────────────┬────────┬────────┐
│00000000│ 41 41 41 41 41 41 41 41 ┊ 41 41 41 41 41 41 41 41 │AAAAAAAA┊AAAAAAAA│
│00000010│ 42 42 42 42 42 42 42 42 ┊ 42 42 42 42 42 42 42 42 │BBBBBBBB┊BBBBBBBB│
│00000020│ 43 43 43 43             ┊                         │CCCC    ┊        │
└────────┴─────────────────────────┴─────────────────────────┴────────┴────────┘
@sharkdp sharkdp added bug Something isn't working good first issue Good for newcomers labels Jan 21, 2025
@sharkdp
Copy link
Owner

sharkdp commented Jan 21, 2025

Thank you for reporting this. Probably only happens when the second-to-last line only contained one character:

> printf "AAAAAAAAAAAAAAAACCCC" | hexyl
┌────────┬─────────────────────────┬─────────────────────────┬────────┬────────┐
│00000000│ 41 41 41 41 41 41 41 41 ┊ 41 41 41 41 41 41 41 41 │AAAAAAAA┊AAAAAAAA│
│*       │ 43 43 43 43             ┊                         │CCCC    ┊        │
└────────┴─────────────────────────┴─────────────────────────┴────────┴────────┘

ilmanzo added a commit to ilmanzo/hexyl that referenced this issue Jan 26, 2025
@ilmanzo ilmanzo linked a pull request Jan 26, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants