mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-19 17:55:10 -04:00
Various minor bugfixes
This commit is contained in:
parent
f3e8505fd4
commit
93d65a910c
9 changed files with 833 additions and 774 deletions
|
@ -388,6 +388,7 @@ char isbn13_check(unsigned char source[]) /* For ISBN(13) only */
|
|||
char isbn_check(unsigned char source[]) /* For ISBN(10) and SBN only */
|
||||
{
|
||||
unsigned int i, weight, sum, check, h;
|
||||
char check_char;
|
||||
|
||||
sum = 0;
|
||||
weight = 1;
|
||||
|
@ -400,7 +401,9 @@ char isbn_check(unsigned char source[]) /* For ISBN(10) and SBN only */
|
|||
}
|
||||
|
||||
check = sum % 11;
|
||||
return itoc(check);
|
||||
check_char = itoc(check);
|
||||
if(check == 10) { check_char = 'X'; }
|
||||
return check_char;
|
||||
}
|
||||
|
||||
int isbn(struct zint_symbol *symbol, unsigned char source[], const unsigned int src_len, char dest[]) /* Make an EAN-13 barcode from an SBN or ISBN */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue