mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-17 18:07:02 +00:00
Consistently throw an error if data does not fit in specified size symbol
See ticket #57
This commit is contained in:
@@ -1141,7 +1141,8 @@ int grid_matrix(struct zint_symbol *symbol, const unsigned char source[], int le
|
||||
if (symbol->option_2 > min_layers) {
|
||||
layers = symbol->option_2;
|
||||
} else {
|
||||
layers = min_layers;
|
||||
strcpy(symbol->errtxt, "Input data too long for selected symbol size");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user