mirror of
https://git.code.sf.net/p/zint/code
synced 2026-05-14 18:13:53 +00:00
raster/vector: fix BARCODE_BIND_TOP trumping BARCODE_BOX
backend/tests/fuzz: update "fuzz.h" to take `option_3` min/max; update `INPUT_MODE_MASK` & `OUTPUT_OPTIONS_MASK`; set `height`, `border_width` & `output_options` from input (removing `Z_FUZZ_SET_OUTPUT_OPTIONS` conditional) and call `ZBarcode_Encode_and_Print()` instead of `ZBarcode_Encode()`; support standalone builds of "fuzz_data" & "fuzz_gs1" with `Z_FUZZ_MAIN_READ_ARGV_1` macro; update "fuzz_gs1" & "fuzz_gs1.dict" to better test caret/raw modes; gen_corpora: add `output_options`, `height` & `border_width` & find (3rd) from fuzz_data of BIND_TOP | BIND_BOX bug
This commit is contained in:
@@ -710,7 +710,8 @@ INTERNAL void zint_out_set_whitespace_offsets(const struct zint_symbol *symbol,
|
||||
|
||||
*p_xoffset = symbol->whitespace_width + qz_left;
|
||||
*p_roffset = symbol->whitespace_width + qz_right;
|
||||
if (symbol->output_options & BARCODE_BOX) {
|
||||
/* BARCODE_BIND_TOP trumps BARCODE_BOX */
|
||||
if (!(symbol->output_options & BARCODE_BIND_TOP) && (symbol->output_options & BARCODE_BOX)) {
|
||||
*p_xoffset += symbol->border_width;
|
||||
*p_roffset += symbol->border_width;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user