]> granicus.if.org Git - postgresql/blobdiff - contrib/isn/isn.c
pgindent run for 9.4
[postgresql] / contrib / isn / isn.c
index 181bbd407211dda0f2e9d33c5f3fd9e9d438ec44..11247449799a816be166ea31e041ec1b54574695 100644 (file)
@@ -4,7 +4,7 @@
  *       PostgreSQL type definitions for ISNs (ISBN, ISMN, ISSN, EAN13, UPC)
  *
  * Author:     German Mendez Bravo (Kronuz)
- * Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1996-2014, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
  *       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);