Correct processing of escape char mode

This commit is contained in:
Robin Stuart 2017-11-05 14:27:01 +00:00
parent a91e4fab79
commit ddce98a1bb
2 changed files with 3 additions and 2 deletions

View File

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

View File

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