This commit is contained in:
Harald Oehlmann 2015-08-18 14:58:30 +02:00
parent 2215b648f0
commit ed1f0bebec

View file

@ -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);