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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user