diff --git a/contrib/isn/isn.c b/contrib/isn/isn.c
index 181bbd407211dda0f2e9d33c5f3fd9e9d438ec44..c7e96022ebaef283bbb690ae7a58f8902841e548 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);