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

@ -1053,6 +1053,11 @@ int grid_matrix(struct zint_symbol *symbol, const unsigned char source[], size_t
}
if (symbol->output_options & READER_INIT) reader = 1;
if (symbol->eci > 811799) {
strcpy(symbol->errtxt, "Invalid ECI");
return ZINT_ERROR_INVALID_OPTION;
}
error_number = gm_encode(gbdata, length, binary, reader, symbol->eci, symbol->debug);
if (error_number != 0) {