mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-27 13:34:19 -04:00
Always latch to non-numeric in general-purpose field
Would not include latch to alphanumeric or ISO/IEC mode if required at the beginning of a general-purpose compaction field. Fixes #146 reported by Gregory Van Vooren
This commit is contained in:
parent
ae737ea019
commit
eb3a004ace
1 changed files with 5 additions and 0 deletions
|
@ -1421,6 +1421,8 @@ static int cc_binary_string(struct zint_symbol *symbol, const char source[], cha
|
|||
if (general_field_type[i - 1] == ISOIEC) {
|
||||
bin_append(4, 5, binary_string); /* ISO/IEC 646 latch */
|
||||
}
|
||||
} else {
|
||||
bin_append(0, 4, binary_string); /* Alphanumeric latch */
|
||||
}
|
||||
|
||||
if ((general_field[i] >= '0') && (general_field[i] <= '9')) {
|
||||
|
@ -1465,6 +1467,9 @@ static int cc_binary_string(struct zint_symbol *symbol, const char source[], cha
|
|||
if (general_field_type[i - 1] == ALPHA) {
|
||||
bin_append(4, 5, binary_string);; /* ISO/IEC 646 latch */
|
||||
}
|
||||
} else {
|
||||
bin_append(0, 4, binary_string); /* Alphanumeric latch */
|
||||
bin_append(4, 5, binary_string); /* ISO/IEC 646 latch */
|
||||
}
|
||||
|
||||
if ((general_field[i] >= '0') && (general_field[i] <= '9')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue