Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix issue where endianness trickery wouldn't swap bytes correctly when reading less than the full amount into an integer#283

Merged
sharksforarms merged 3 commits into
sharksforarms:masterfrom
caass:master
Oct 9, 2022
Merged

Fix issue where endianness trickery wouldn't swap bytes correctly when reading less than the full amount into an integer#283
sharksforarms merged 3 commits into
sharksforarms:masterfrom
caass:master

Conversation

@caass
Copy link
Copy Markdown
Contributor

@caass caass commented Oct 8, 2022

  • Add regression test
  • add little-endian test as well
  • Fix issue where endianness trickery wouldn't swap bytes correctly when reading less than the full amount

Closes #282

@caass
Copy link
Copy Markdown
Contributor Author

caass commented Oct 8, 2022

I see CI is failing, but it looks unrelated to my PR? Let me know if there's something I need to do to fix this :)

@sharksforarms
Copy link
Copy Markdown
Owner

Looks good to me. Good catch! Thanks for the tests.

@sharksforarms sharksforarms merged commit c349405 into sharksforarms:master Oct 9, 2022
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.

#[deku(bits = 24)] and #[deku(bytes = 3)] have different behaviors reading big-endian u32

2 participants