mirror of
https://github.com/postgres/postgres.git
synced 2026-04-15 22:10:45 -04:00
Fix calculation of ISMN check digit.
This has always been broken, so back-patch to all supported versions. Fabien COELHO
This commit is contained in:
parent
2de9051868
commit
f6d6b42f2b
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue