Skip to content

Commit 866a1f0

Browse files
committed
Fix calculation of ISMN check digit.
This has always been broken, so back-patch to all supported versions. Fabien COELHO
1 parent 0403814 commit 866a1f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/isn/isn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ string2ean(const char *str, bool errorOK, ean13 *result,
827827
case ISMN:
828828
strncpy(buf, "9790", 4); /* this isn't for sure yet, for now
829829
* ISMN it's only 9790 */
830-
valid = (valid && ((rcheck = checkdig(buf + 3, 10)) == check || magic));
830+
valid = (valid && ((rcheck = checkdig(buf, 13)) == check || magic));
831831
break;
832832
case ISBN:
833833
strncpy(buf, "978", 3);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy