From 5fe18d0ffaa6017b41e5ff638eb63997eecac4a1 Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Mon, 9 May 2011 09:02:01 +0100 Subject: [PATCH] Correct ISBN13 check digit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ISBN-13 check digit now correctly identifies '0'. Thanks to Kévin Sailly. --- backend/upcean.c | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/upcean.c b/backend/upcean.c index da12c8f2..516aa954 100644 --- a/backend/upcean.c +++ b/backend/upcean.c @@ -378,6 +378,7 @@ char isbn13_check(unsigned char source[]) /* For ISBN(13) only */ check = sum % 10; check = 10 - check; + if(check == 10) check = 0; return itoc(check); }