1
0
mirror of https://git.code.sf.net/p/zint/code synced 2026-01-21 02:46:08 +00:00

DOTCODE: fix not emitting FNC1 (signalling non-GS1) when input

just 2 digits
cmake: set `rpath` of CLI frontend on macOS install (ticket #346,
  props Hagen Röwer)
cmake: make uninstall: update to use `-E rm` if available, warn
  rather than fatal error if fail to remove, note if leaving
  "/zint" directory unremoved (i.e. "lib/cmake/zint")
library: de-duplicate errtxt no.
test suite: update BWIPP to latest
test suite: test_bwipp: enable & fix dotcode random test
test suite: fuzz: gen_corpora fuzz_data 1st -> 2nd
This commit is contained in:
gitlost
2026-01-18 19:14:10 +00:00
parent 74c9e7a9a7
commit eea16e1a89
59 changed files with 962 additions and 657 deletions

View File

@@ -1,7 +1,7 @@
/* dotcode.c - Handles DotCode */
/*
libzint - the open source barcode library
Copyright (C) 2017-2025 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2017-2026 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@@ -532,7 +532,7 @@ static int dc_encode_message(struct zint_symbol *symbol, const unsigned char sou
if (symbol->output_options & READER_INIT) {
codeword_array[ap++] = 109; /* FNC3 */
} else if (!gs1 && eci == 0 && length > 2 && z_is_twodigits(source, length, 0)) {
} else if (!gs1 && eci == 0 && length >= 2 && z_is_twodigits(source, length, 0)) {
codeword_array[ap++] = 107; /* FNC1 */
} else if (z_posn(lead_specials, source[0]) != -1) {