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

Code bug #37

Closed
pgolebiowski opened this issue May 14, 2019 · 2 comments
Closed

Code bug #37

pgolebiowski opened this issue May 14, 2019 · 2 comments

Comments

@pgolebiowski
Copy link

pgolebiowski commented May 14, 2019

ByteSize.FromBits(Int64.MaxValue);

The above initializes the struct with a number of bits equal to -9223372036854775808. Surrounding large numbers also don't work.

Please fix your math or change the argument type to Int32 if you handle smaller numbers only.

omar added a commit that referenced this issue Jun 5, 2019
@omar
Copy link
Owner

omar commented Jun 5, 2019

Thanks for pointing this out, I've fixed the issue in this commit that's slated to be part of the next version. 6425b77#diff-d2822c0dc3a5209b07ad5954b9c3ddaa

@omar omar closed this as completed in 1bbc35a Jan 4, 2020
@omar
Copy link
Owner

omar commented Jan 14, 2020

This fix is in v2, see https://www.nuget.org/packages/ByteSize/2.0.0

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

2 participants