From 7acb709e6a52901643f4b5ba18898c8b2774bb70 Mon Sep 17 00:00:00 2001 From: hooper114 Date: Mon, 21 Dec 2009 08:42:49 +0000 Subject: [PATCH] Correct encoding bug. --- backend/pdf417.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/backend/pdf417.c b/backend/pdf417.c index 62a5a611..81cefe7c 100644 --- a/backend/pdf417.c +++ b/backend/pdf417.c @@ -30,7 +30,7 @@ symbol->option_2 is used to adjust the width of the resulting symbol (i.e. the number of codeword columns not including row start and end data) */ -/* @(#) $Id: pdf417.c,v 1.19 2009/12/21 08:16:03 hooper114 Exp $ */ +/* @(#) $Id: pdf417.c,v 1.20 2009/12/21 08:42:49 hooper114 Exp $ */ #include #include @@ -734,7 +734,7 @@ int pdf417enc(struct zint_symbol *symbol, unsigned char source[], int length) } -int micro_pdf417(struct zint_symbol *symbol, unsigned char source[], int length) +int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], int length) { /* like PDF417 only much smaller! */ int i, k, j, indexchaine, indexliste, mode, longueur, mccorrection[50], offset; @@ -743,12 +743,6 @@ int micro_pdf417(struct zint_symbol *symbol, unsigned char source[], int length) int variant, LeftRAPStart, CentreRAPStart, RightRAPStart, StartCluster; int LeftRAP, CentreRAP, RightRAP, Cluster, writer, flip, loop; int debug = 0; - -#ifndef _MSC_VER - unsigned char chaine[length + 1]; -#else - unsigned char* chaine = (unsigned char*)_alloca(length + 1); -#endif /* Encoding starts out the same as PDF417, so use the same code */ codeerr = 0; @@ -757,7 +751,6 @@ int micro_pdf417(struct zint_symbol *symbol, unsigned char source[], int length) indexliste = 0; indexchaine = 0; - mode = quelmode(chaine[indexchaine]); for(i = 0; i < 1000; i++) {