diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2014-01-13 15:42:35 +0200 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2014-01-13 15:44:04 +0200 |
commit | 5143dfd5713299048c556d69f93bf17108693db9 (patch) | |
tree | bf1dcad07700b7b4256abe1629cd2e3ab4395c40 | |
parent | 3f721588aec49efeb2e118f2303d72a97f7c7d34 (diff) | |
download | postgresql-5143dfd5713299048c556d69f93bf17108693db9.tar.gz postgresql-5143dfd5713299048c556d69f93bf17108693db9.zip |
Fix calculation of ISMN check digit.
This has always been broken, so back-patch to all supported versions.
Fabien COELHO
-rw-r--r-- | contrib/isn/isn.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/isn/isn.c b/contrib/isn/isn.c index b698cb00ff5..40942750feb 100644 --- a/contrib/isn/isn.c +++ b/contrib/isn/isn.c @@ -827,7 +827,7 @@ string2ean(const char *str, bool errorOK, ean13 *result, case ISMN: strncpy(buf, "9790", 4); /* this isn't for sure yet, for now * ISMN it's only 9790 */ - valid = (valid && ((rcheck = checkdig(buf + 3, 10)) == check || magic)); + valid = (valid && ((rcheck = checkdig(buf, 13)) == check || magic)); break; case ISBN: strncpy(buf, "978", 3); |