mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-28 05:54:19 -04:00
Allow lowercase input for VIN codes
This commit is contained in:
parent
e737f992b5
commit
37d3e60c3a
1 changed files with 8 additions and 6 deletions
|
@ -613,12 +613,6 @@ int vin(struct zint_symbol *symbol, unsigned char source[], int length) {
|
|||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
|
||||
// Check input characters, I, O and Q are not allowed
|
||||
if (is_sane(ARSENIC, source, length) == ZINT_ERROR_INVALID_DATA) {
|
||||
strcpy(symbol->errtxt, "337: Invalid characters in input data");
|
||||
return ZINT_ERROR_INVALID_DATA;
|
||||
}
|
||||
|
||||
// Pad with zeros
|
||||
zeros = 17 - length;
|
||||
|
||||
|
@ -631,6 +625,14 @@ int vin(struct zint_symbol *symbol, unsigned char source[], int length) {
|
|||
local_source[zeros + i] = source[i];
|
||||
}
|
||||
|
||||
to_upper((unsigned char *) local_source);
|
||||
|
||||
// Check input characters, I, O and Q are not allowed
|
||||
if (is_sane(ARSENIC, (unsigned char *) local_source, length) == ZINT_ERROR_INVALID_DATA) {
|
||||
strcpy(symbol->errtxt, "337: Invalid characters in input data");
|
||||
return ZINT_ERROR_INVALID_DATA;
|
||||
}
|
||||
|
||||
input_check = local_source[8];
|
||||
|
||||
for (i = 0; i < 17; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue