1
0
mirror of https://git.code.sf.net/p/zint/code synced 2026-01-10 05:26:00 +00:00

ISBN-13 check digit now correctly identifies '0'.

Thanks to Kévin Sailly.
This commit is contained in:
tgotic
2011-05-16 20:04:56 +02:00
parent d550f18d90
commit 6ad0a0bd70

View File

@@ -376,8 +376,8 @@ char isbn13_check(unsigned char source[]) /* For ISBN(13) only */
if(weight == 1) weight = 3; else weight = 1;
}
check = sum % 10;
check = 10 - check;
check = (10 - (sum % 10)) % 10;
return itoc(check);
}