diff --git a/backend/aztec.c b/backend/aztec.c index 581ac65f..561cf207 100644 --- a/backend/aztec.c +++ b/backend/aztec.c @@ -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);