Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+1-1
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)