From ddce98a1bbdc4ab4f4c32dfa9fa749ab7b766421 Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Sun, 5 Nov 2017 14:27:01 +0000 Subject: [PATCH] Correct processing of escape char mode --- backend/library.c | 3 ++- frontend/main.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/library.c b/backend/library.c index 7ee64cf7..56125c23 100644 --- a/backend/library.c +++ b/backend/library.c @@ -1079,7 +1079,8 @@ int ZBarcode_Encode(struct zint_symbol *symbol, const unsigned char *source, int local_source[in_length] = '\0'; } - if (symbol->input_mode &= ESCAPE_MODE) { + if (symbol->input_mode & ESCAPE_MODE) { + printf("Esc process\n"); error_number = escape_char_process(symbol, local_source, &in_length); if (error_number != 0) { return error_number; diff --git a/frontend/main.c b/frontend/main.c index befa7a0d..af76792b 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -627,7 +627,7 @@ int main(int argc, char **argv) { } } if (!strcmp(long_options[option_index].name, "esc")) { - if (!(my_symbol->input_mode &= ESCAPE_MODE)) { + if (!(my_symbol->input_mode & ESCAPE_MODE)) { my_symbol->input_mode += ESCAPE_MODE; } }