mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
raster.c: fix possible blank rows appearing in CODE16K, CODE49, PHARMA_TWO,
PDF417 & CODABLOCKF due to height/scale rounding by changing out_large_bar_height() to return scaled int values for raster, props codemonkey82 (#204) raster/vector.c: const some vars vector.c: rect_count, last_start_row UPC/EAN only library.c: check for stacking symbols >= 200
This commit is contained in:
@ -908,6 +908,10 @@ int ZBarcode_Encode(struct zint_symbol *symbol, const unsigned char *source, int
|
||||
return error_tag(symbol, ZINT_ERROR_INVALID_OPTION, "768: Border width out of range (0 to 100)");
|
||||
}
|
||||
|
||||
if (symbol->rows >= 200) { /* Check for stacking too many symbols */
|
||||
return error_tag(symbol, ZINT_ERROR_TOO_LONG, "770: Too many stacked symbols");
|
||||
}
|
||||
|
||||
if ((symbol->input_mode & 0x07) > 2) {
|
||||
symbol->input_mode = DATA_MODE; /* Reset completely TODO: in future, warn/error */
|
||||
}
|
||||
|
Reference in New Issue
Block a user