From 7e0893aa30b39462403e408dac25b34ac8fe3741 Mon Sep 17 00:00:00 2001 From: hooper114 Date: Thu, 19 Feb 2009 20:10:36 +0000 Subject: [PATCH] Mode C bugfix --- backend/code16k.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/code16k.c b/backend/code16k.c index f4c7c29a..e0551947 100644 --- a/backend/code16k.c +++ b/backend/code16k.c @@ -192,10 +192,10 @@ int code16k(struct zint_symbol *symbol, unsigned char source[]) } while (indexchaine < input_length); dxsmooth(&indexliste); - + /* Resolve odd length LATCHC blocks */ if((list[1][0] == LATCHC) && ((list[0][0] % 2) == 1)) { - for(i = 1; i <= indexliste; i++) { + for(i = indexliste; i > 0; i--) { list[0][i] = list[0][i - 1]; list[1][i] = list[1][i - 1]; } @@ -443,7 +443,7 @@ int code16k(struct zint_symbol *symbol, unsigned char source[]) read++; } } while (read < ustrlen(source)); - + pads_needed = 5 - ((bar_characters + 2) % 5); if(pads_needed == 5) { pads_needed = 0;