Expand ECI support and enforce binary mode when ECI is set

This commit is contained in:
Robin Stuart 2017-07-23 17:59:51 +01:00
parent d818d1aecc
commit 451f0150d8
6 changed files with 52 additions and 10 deletions

View file

@ -1212,6 +1212,11 @@ int dotcode(struct zint_symbol *symbol, const unsigned char source[], int length
unsigned char* masked_codeword_array;
unsigned char* codeword_array = (unsigned char *) _alloca(length * 3 * sizeof (unsigned char));
#endif /* _MSC_VER */
if (symbol->eci > 811799) {
strcpy(symbol->errtxt, "Invalid ECI");
return ZINT_ERROR_INVALID_OPTION;
}
data_length = dotcode_encode_message(symbol, source, length, codeword_array, &binary_finish);