mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Allow PDF to latch into numeric compaction
Logic error prevented numeric compaction in PDF417 and MicroPDF417 Fixes #155 reported by Michelle Dupuis
This commit is contained in:
parent
f2262f2616
commit
be9e2fd87a
@ -89,7 +89,8 @@ int quelmode(char codeascii) {
|
|||||||
int mode = BYT;
|
int mode = BYT;
|
||||||
if ((codeascii == '\t') || (codeascii == '\n') || (codeascii == '\r') || ((codeascii >= ' ') && (codeascii <= '~'))) {
|
if ((codeascii == '\t') || (codeascii == '\n') || (codeascii == '\r') || ((codeascii >= ' ') && (codeascii <= '~'))) {
|
||||||
mode = TEX;
|
mode = TEX;
|
||||||
} else if ((codeascii >= '0') && (codeascii <= '9')) {
|
}
|
||||||
|
if ((codeascii >= '0') && (codeascii <= '9')) {
|
||||||
mode = NUM;
|
mode = NUM;
|
||||||
}
|
}
|
||||||
/* 876 */
|
/* 876 */
|
||||||
@ -760,6 +761,14 @@ static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const size
|
|||||||
for (i = k - 1; i >= 0; i--) {
|
for (i = k - 1; i >= 0; i--) {
|
||||||
chainemc[mclength++] = mccorrection[i] ? 929 - mccorrection[i] : 0;
|
chainemc[mclength++] = mccorrection[i] ? 929 - mccorrection[i] : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (debug) {
|
||||||
|
printf("Complete CW string:\n");
|
||||||
|
for (i = 0; i < mclength; i++) {
|
||||||
|
printf("%d ", chainemc[i]);
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
|
||||||
/* 818 - The CW string is finished */
|
/* 818 - The CW string is finished */
|
||||||
c1 = (mclength / symbol->option_2 - 1) / 3;
|
c1 = (mclength / symbol->option_2 - 1) / 3;
|
||||||
|
Loading…
Reference in New Issue
Block a user