-
Notifications
You must be signed in to change notification settings - Fork 20
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
write_signed
cannot handle 32 bits
#3
Comments
Yup, I've run into this issue as well. It generally happens when you try to Lines 215 to 219 in 29973ff
The write_signed() function calls write() on value with sign bit removed and bits - 1 as the bits parameter, however as the type is signed the operation U::one() << bits moves 1 into the sign bit resulting in the minimum signed int value for the type. As every possible input value is greater than the minimum type value the error is raised.
For example let's try to |
This was fixed in 5c5dd5a it seems |
Running the code
results in the following error message
excessive value for bits written
(same for
BigEndian
and all other values)The text was updated successfully, but these errors were encountered: