mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Allow lowercase input for VIN codes
This commit is contained in:
parent
e737f992b5
commit
37d3e60c3a
@ -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…
Reference in New Issue
Block a user