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

jets: fix jet_rev #193

Merged
merged 2 commits into from
Dec 20, 2023
Merged

jets: fix jet_rev #193

merged 2 commits into from
Dec 20, 2023

Conversation

drbeefsupreme
Copy link
Contributor

jet_rev had an issue with the indirect atom case. IndirectAtom::new_raw would normally be fine since we normalize, but since we're reversing endianness, we end up using the extra space. So the fix is to use IndirectAtom::new_raw_bytes instead.

I've also added a test case that catches this, which fails for the previous version.

@eamsden
Copy link
Collaborator

eamsden commented Dec 19, 2023

@drbeefsupreme this should actually call IndirectAtom::new_raw_mut_bitslice() and call normalize_as_atom on the indirect atom afterwards.

rust/ares/src/jets/bits.rs Show resolved Hide resolved
rust/ares/src/jets/bits.rs Show resolved Hide resolved
@eamsden eamsden merged commit a96c669 into status Dec 20, 2023
1 check passed
@eamsden eamsden deleted the jon/fix-rev branch December 20, 2023 17:05
@drbeefsupreme drbeefsupreme restored the jon/fix-rev branch January 4, 2024 16:49
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.

3 participants