From dc21ca11905733fcda83ec554494e3b030d1e58b Mon Sep 17 00:00:00 2001 From: hooper114 Date: Sun, 2 Aug 2009 10:06:41 +0000 Subject: [PATCH] Correct error plotting "0" values to MicroPDF --- backend/composite.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/composite.c b/backend/composite.c index fe3d50c3..0e62a787 100644 --- a/backend/composite.c +++ b/backend/composite.c @@ -251,7 +251,7 @@ int cc_a(struct zint_symbol *symbol, char source[], int cc_width) concat(codebarre, "1"); concat(codebarre, codagemc[offset + dummy[1]]); concat(codebarre, "1"); - if(dummy[2] != 0) { + if(cc_width >= 2) { concat(codebarre, "1"); concat(codebarre, codagemc[offset + dummy[2]]); concat(codebarre, "1"); @@ -259,12 +259,12 @@ int cc_a(struct zint_symbol *symbol, char source[], int cc_width) if(CentreRAPStart != 0) { concat(codebarre, RAPC[CentreRAP]); } - if(dummy[3] != 0) { + if(cc_width >= 3) { concat(codebarre, "1"); concat(codebarre, codagemc[offset + dummy[3]]); concat(codebarre, "1"); } - if(dummy[4] != 0) { + if(cc_width == 4) { concat(codebarre, "1"); concat(codebarre, codagemc[offset + dummy[4]]); concat(codebarre, "1"); @@ -483,7 +483,7 @@ int cc_b(struct zint_symbol *symbol, char source[], int cc_width) if(cc_width == 3) { concat(codebarre, RAPC[CentreRAP]); } - if(dummy[2] != 0) { + if(cc_width >= 2) { concat(codebarre, "1"); concat(codebarre, codagemc[offset + dummy[2]]); concat(codebarre, "1"); @@ -491,12 +491,12 @@ int cc_b(struct zint_symbol *symbol, char source[], int cc_width) if(cc_width == 4) { concat(codebarre, RAPC[CentreRAP]); } - if(dummy[3] != 0) { + if(cc_width >= 3) { concat(codebarre, "1"); concat(codebarre, codagemc[offset + dummy[3]]); concat(codebarre, "1"); } - if(dummy[4] != 0) { + if(cc_width == 4) { concat(codebarre, "1"); concat(codebarre, codagemc[offset + dummy[4]]); concat(codebarre, "1");