mirror of
https://git.code.sf.net/p/zint/code
synced 2024-09-19 15:28:56 -04:00
Handle NULL for Aztec Symbology (https://sourceforge.net/p/zint/mailman/message/29335201/)
This commit is contained in:
parent
2215b648f0
commit
ed1f0bebec
1 changed files with 1 additions and 9 deletions
|
@ -99,7 +99,7 @@ int aztec_text_process(unsigned char source[], const unsigned int src_len, char
|
|||
charmap[maplength] = 400;
|
||||
typemap[maplength++] = PUNC;
|
||||
} else {
|
||||
if(source[i] > 127) {
|
||||
if((source[i] > 127) || (source[i] == 0)) {
|
||||
charmap[maplength] = source[i];
|
||||
typemap[maplength++] = BINARY;
|
||||
} else {
|
||||
|
@ -705,14 +705,6 @@ int aztec(struct zint_symbol *symbol, unsigned char source[], int length)
|
|||
break;
|
||||
}
|
||||
|
||||
/* Aztec code can't handle NULL characters */
|
||||
for(i = 0; i < length; i++) {
|
||||
if(local_source[i] == '\0') {
|
||||
strcpy(symbol->errtxt, "Invalid character (NULL) in input data");
|
||||
return ERROR_INVALID_DATA;
|
||||
}
|
||||
}
|
||||
|
||||
err_code = aztec_text_process(local_source, length, binary_string, gs1);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue