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

Fixed bug in package_tool #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anomie0xff
Copy link

@anomie0xff anomie0xff commented Feb 8, 2023

package_tool takes a feature_number and tries to convert it to 1 byte with feature_number.to_bytes(1, "little") which will break for any feature numbers greater than 255 with the error OverflowError: int too big to convert. The technical specification says the feature number is 32 bits long.

To make it conform to the technical specifications but with minimal refactoring (the package number is expected to be 1 byte in several places), and since the only feature numbers that will be used are 1 and 2, the feature number is truncated to 8 bits during packaging

@krscaplen
Copy link

@dtwalter approved

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.

2 participants