mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Handle NULL for Aztec Symbology (https://sourceforge.net/p/zint/mailman/message/29335201/)
This commit is contained in:
parent
2215b648f0
commit
ed1f0bebec
@ -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…
x
Reference in New Issue
Block a user