mirror of
https://github.com/woo-j/zint.git
synced 2024-12-26 07:21:31 +03:00
tidy up
This commit is contained in:
parent
7c30733116
commit
834a689e7c
@ -63,6 +63,10 @@ int gs1_verify(struct zint_symbol *symbol, unsigned char source[], char reduced[
|
||||
strcpy(symbol->errtxt, "Extended ASCII characters are not supported by GS1");
|
||||
return ERROR_INVALID_DATA;
|
||||
}
|
||||
if(source[i] < 32) {
|
||||
strcpy(symbol->errtxt, "Control characters are not supported by GS1");
|
||||
return ERROR_INVALID_DATA;
|
||||
}
|
||||
}
|
||||
|
||||
if(source[0] != '[') {
|
||||
@ -77,8 +81,10 @@ int gs1_verify(struct zint_symbol *symbol, unsigned char source[], char reduced[
|
||||
max_ai_length = 0;
|
||||
min_ai_length = 5;
|
||||
j = 0;
|
||||
ai_latch = 0;
|
||||
for(i = 0; i < ustrlen(source); i++) {
|
||||
ai_length += j;
|
||||
if((j == 1) && ((source[i] < '0') || (source[i] > '9'))) { ai_latch = 1; }
|
||||
if(source[i] == '[') { bracket_level++; j = 1; }
|
||||
if(source[i] == ']') {
|
||||
bracket_level--;
|
||||
|
Loading…
Reference in New Issue
Block a user