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: do not trim when serializing borsch #422

Merged
merged 1 commit into from
Dec 24, 2024

Conversation

Evalir
Copy link
Contributor

@Evalir Evalir commented Dec 24, 2024

Closes #420

Motivation

this bug will cause structs containing uints with trailing 0 bytess that are still within the fixed byte size of the integer to serialize incorrectly

Solution

don't trim, always write the exact byte size. see #421

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

@Evalir Evalir requested a review from prestwich as a code owner December 24, 2024 16:15
@prestwich prestwich merged commit ecfdbda into recmo:main Dec 24, 2024
17 checks passed
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.

Borsh implementation incorrectly serializes uints with trailing zeroe bytes
2 participants