We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
bincopy/bincopy.py
Line 30 in 6093eac
The line crc = (0x100 - crc) will give 0x100 instead of 0x00 for the two's complement of zero.
crc = (0x100 - crc)
Try crc = (~crc + 1) & 0xff instead.
crc = (~crc + 1) & 0xff
The text was updated successfully, but these errors were encountered:
Fix issue #1: ihex crc breaks when crc is 0
a9851cb
There was a bug in the intel hex crc algorithm when the crc is 0. Suggested fix is implemented.
Thanks for the bug report. I corrected the code and added a unittest for ihex crc calculations.
Sorry, something went wrong.
No branches or pull requests
bincopy/bincopy.py
Line 30 in 6093eac
The line
crc = (0x100 - crc)
will give 0x100 instead of 0x00 for the two's complement of zero.Try
crc = (~crc + 1) & 0xff
instead.The text was updated successfully, but these errors were encountered: