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

Descriptive integers #132

Merged
merged 5 commits into from
Apr 15, 2024
Merged

Descriptive integers #132

merged 5 commits into from
Apr 15, 2024

Conversation

udoprog
Copy link
Owner

@udoprog udoprog commented Apr 15, 2024

This fixes an issue where data encoded in musli-descriptive would be incorrectly decoded in case there is a type-mismatch.

For example, if a i32 is decoded as a u32, zigzag encoding (if enabled) would cause the integer to be twice as wide when continuation-decoded.

This patch ensures that the available type information is used during decoding, and coerces integers into the appropriate format.

Also fixes an encoding mismatch with [T; N] arrays.

@udoprog udoprog added the bug Something isn't working label Apr 15, 2024
@udoprog udoprog changed the title Desriptive integers Descriptive integers Apr 15, 2024
@udoprog udoprog merged commit 377df4b into main Apr 15, 2024
19 checks passed
@udoprog udoprog deleted the desriptive-integers branch April 15, 2024 16:58
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 this pull request may close these issues.

1 participant