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

fix checksum calculation code #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

almontasser
Copy link

When summing the higher two bytes with the lower two bytes, that results sometimes to an overflow, meaning the result is bigger than 0xffff (16 bit). This way we keep folding the upper bytes until we end up with a 16 bit checksum

When summing the higher two bytes with the lower two bytes, that results sometimes to an overflow, meaning the result is bigger than 0xffff (16 bit). This way we keep folding the upper bytes until we end up with a 16 bit checksum
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.

1 participant