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

Correct unsigned long handling (#161) #168

Merged
merged 1 commit into from
Dec 19, 2023
Merged

Conversation

jchrys
Copy link
Collaborator

@jchrys jchrys commented Dec 18, 2023

Motivation:

Length-encoded integers should be handled correctly, especially those larger than Long.MAX_VALUE. See also #39.

Modification:

  • Add code comments to explain how to handle the length encoded integer.
  • Correct LargeFieldReader.readSlice() method, it should use the length as an unsigned long.

Result:

  • LargeFieldReader.readSlice() should now work correctly for fields those size is greater than 263-1

Motivation:

Length-encoded integers should be handled correctly, especially those
larger than `Long.MAX_VALUE`. See also #39.

Modification:

- Add code comments to explain how to handle the length encoded integer.
- Correct `LargeFieldReader.readSlice()` method, it should use the
length as an unsigned long.

Result:

- `LargeFieldReader.readSlice()` should now work correctly for fields
those size is greater than 2<sup>63</sup>-1
Copy link
Contributor

@mirromutth mirromutth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mirromutth mirromutth merged commit f07c39d into 0.9.x Dec 19, 2023
9 checks passed
@mirromutth mirromutth deleted the 0.9.x-unsigned-long-handle branch December 19, 2023 10:08
@jchrys jchrys added bug Something isn't working enhancement New feature or request labels Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants