AZTEC: re MR #122, use printf .* for debug, remove unneeded inits

This commit is contained in:
gitlost 2021-06-16 17:45:25 +01:00
parent 6673289944
commit f6a90c5a48

View File

@ -468,7 +468,6 @@ static int aztec_text_process(const unsigned char source[], int src_len, char bi
printf("\n"); printf("\n");
} }
*binary_string = '\0';
bp = 0; bp = 0;
if (gs1) { if (gs1) {
@ -737,7 +736,7 @@ static int aztec_text_process(const unsigned char source[], int src_len, char bi
if (debug) { if (debug) {
printf("Binary String:\n"); printf("Binary String:\n");
printf("%s\n", binary_string); printf("%.*s\n", bp, binary_string);
} }
*data_length = bp; *data_length = bp;
@ -851,9 +850,6 @@ INTERNAL int aztec(struct zint_symbol *symbol, unsigned char source[], int lengt
unsigned int* ecc_part; unsigned int* ecc_part;
#endif #endif
memset(adjusted_string, 0, AZTEC_MAX_CAPACITY);
memset(bit_pattern, 0, AZTEC_MAP_POSN_MAX + 1);
if ((symbol->input_mode & 0x07) == GS1_MODE) { if ((symbol->input_mode & 0x07) == GS1_MODE) {
gs1 = 1; gs1 = 1;
} else { } else {