mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-29 06:15:23 -04:00
removed unlatch before trailing single-symbol ASCII characters in accordance with specification. this fixes a problem with the symbol size growing larger than required
This commit is contained in:
parent
1a7863520b
commit
fe7b71ae31
1 changed files with 3 additions and 3 deletions
|
@ -671,7 +671,7 @@ int dm200encode(struct zint_symbol *symbol, unsigned char source[], unsigned cha
|
||||||
current_mode = DM_ASCII;
|
current_mode = DM_ASCII;
|
||||||
}
|
}
|
||||||
if(c40_p == 1) {
|
if(c40_p == 1) {
|
||||||
target[tp] = 254; tp++; /* unlatch */
|
// don't unlatch before sending a single remaining ASCII character.
|
||||||
target[tp] = source[inputlen - 1] + 1; tp++;
|
target[tp] = source[inputlen - 1] + 1; tp++;
|
||||||
concat(binary, " ");
|
concat(binary, " ");
|
||||||
if(debug) printf("ASC A%02X ", target[tp - 1] - 1);
|
if(debug) printf("ASC A%02X ", target[tp - 1] - 1);
|
||||||
|
@ -687,7 +687,7 @@ int dm200encode(struct zint_symbol *symbol, unsigned char source[], unsigned cha
|
||||||
current_mode = DM_ASCII;
|
current_mode = DM_ASCII;
|
||||||
}
|
}
|
||||||
if(text_p == 1) {
|
if(text_p == 1) {
|
||||||
target[tp] = 254; tp++; /* unlatch */
|
// don't unlatch before sending a single remaining ASCII character.
|
||||||
target[tp] = source[inputlen - 1] + 1; tp++;
|
target[tp] = source[inputlen - 1] + 1; tp++;
|
||||||
concat(binary, " ");
|
concat(binary, " ");
|
||||||
if(debug) printf("ASC A%02X ", target[tp - 1] - 1);
|
if(debug) printf("ASC A%02X ", target[tp - 1] - 1);
|
||||||
|
@ -703,7 +703,7 @@ int dm200encode(struct zint_symbol *symbol, unsigned char source[], unsigned cha
|
||||||
current_mode = DM_ASCII;
|
current_mode = DM_ASCII;
|
||||||
}
|
}
|
||||||
if(x12_p == 1) {
|
if(x12_p == 1) {
|
||||||
target[tp] = 254; tp++; /* unlatch */
|
// don't unlatch before sending a single remaining ASCII character.
|
||||||
target[tp] = source[inputlen - 1] + 1; tp++;
|
target[tp] = source[inputlen - 1] + 1; tp++;
|
||||||
concat(binary, " ");
|
concat(binary, " ");
|
||||||
if(debug) printf("ASC A%02X ", target[tp - 1] - 1);
|
if(debug) printf("ASC A%02X ", target[tp - 1] - 1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue