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 output when reading from terminal #196

Closed
Aaron-Rumpler opened this issue Jun 17, 2023 · 2 comments · Fixed by #197
Closed

Incorrect output when reading from terminal #196

Aaron-Rumpler opened this issue Jun 17, 2023 · 2 comments · Fixed by #197
Labels
bug Something isn't working

Comments

@Aaron-Rumpler
Copy link

Hexyl is giving incorrect output in some cases when reading terminal input. I've seen it when the input has multiple newlines at the end. The input of Test[Enter][Enter][Enter][Enter][CTRL-D] is one such case:

❯ hexyl
Test



┌────────┬─────────────────────────┬─────────────────────────┬────────┬────────┐
│00000000│ 54 65 73 74 0a 0a 00 00 ┊ 00 00 00 00 00 00 00 00 │Test__⋄⋄┊⋄⋄⋄⋄⋄⋄⋄⋄│
│00000010│ 0a 0a 73 74 0a 0a 00 00 ┊ 00 00 00 00 00 00 00 00 │__st__⋄⋄┊⋄⋄⋄⋄⋄⋄⋄⋄│
└────────┴─────────────────────────┴─────────────────────────┴────────┴────────┘

I've been able to track it back to 15e8abf through 5f82942, with it being introduced in that set of changes.

@Aaron-Rumpler
Copy link
Author

Aaron-Rumpler commented Jun 17, 2023

I should probably mention I tested this on macOS 13.4 and tried from both Bash and ZSH in both iTerm2 and Terminal. Neither hexdump or commits before 15e8abf exhibit the issue.

@sharifhsn
Copy link
Contributor

I can reproduce this issue on Linux. I'll take a look at it today, thanks for raising an 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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants