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

Fix missing line return when viewing dumps #2546

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

jmichelp
Copy link
Contributor

@jmichelp jmichelp commented Oct 1, 2024

For some reason, isprint() claims that 0xff is printable. But it's used by PrintAndLog functions as a marker value to suppress the line return.

So when viewing a dump where the last byte of a block/sector is 0xff, it was suppressing the new line between blocks/sectors. This fixes it by excluding 0xff from printable values.

For some reason, `isprint()` claims that `0xff` is printable. But it's used by print functions as a magic value to suppress the line return.
So when viewing a dump where the last byte of a block/sector is `0xff`, it was suppressing the new line between blocks/sectors.

Signed-off-by: Jean-Michel Picod <jmichel.p@gmail.com>
Copy link

github-actions bot commented Oct 1, 2024

You are welcome to add an entry to the CHANGELOG.md as well

@iceman1001 iceman1001 merged commit daa2fe1 into RfidResearchGroup:master Oct 1, 2024
12 checks passed
@iceman1001
Copy link
Collaborator

Great catch!

I wouldn't have thought that one. the 0xFF as a marker might not be documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants