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 erroneous calculation in calculate_checksum #213

Merged
merged 2 commits into from
Sep 21, 2023

Conversation

fra87
Copy link
Contributor

@fra87 fra87 commented Aug 28, 2023

The EAN checksum calculation is correct only if the self.ean variable does not have the checksum value already present. This may not be true in some cases (e.g. someone trying to compare an already present checksum with the library-generated one)

@WhyNotHugo WhyNotHugo merged commit 996eaf9 into WhyNotHugo:main Sep 21, 2023
13 checks passed
WhyNotHugo added a commit that referenced this pull request Sep 21, 2023
@WhyNotHugo
Copy link
Owner

Apologies, I missed your PR earlier.

I had written a fix for this same issue (#215), but yours is a lot simpler, so I've merged your approach but kept the tests from my PR.

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