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

Invalid return for signed bytes in GetNumberSize #14

Open
jtsylve opened this issue Jan 25, 2021 · 0 comments
Open

Invalid return for signed bytes in GetNumberSize #14

jtsylve opened this issue Jan 25, 2021 · 0 comments

Comments

@jtsylve
Copy link

jtsylve commented Jan 25, 2021

if (value < byte.MinValue || value > byte.MaxValue) return B2;

This function returns an invalid number of bytes for signed 8-bit integers. I believe the check should be referencing SByte.MinValue and SByte.MaxValue rather than byte.

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

No branches or pull requests

1 participant