From 9b569c8717e0b1feaa1b711b8838e1ed2c2c4d7b Mon Sep 17 00:00:00 2001 From: hooper114 Date: Tue, 13 Jan 2009 17:49:37 +0000 Subject: [PATCH] Correct length estimate for FNC1 --- backend/code128.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/backend/code128.c b/backend/code128.c index 3f57b61a..6379a4ef 100644 --- a/backend/code128.c +++ b/backend/code128.c @@ -689,7 +689,7 @@ int ean_128(struct zint_symbol *symbol, unsigned char source[]) } } - if(set[i] == 'C') { + if((set[i] == 'C') && (reduced[i] != '[')) { glyph_count = glyph_count + 0.5; } else { glyph_count = glyph_count + 1.0; @@ -765,9 +765,10 @@ int ean_128(struct zint_symbol *symbol, unsigned char source[]) c128_set_b(reduced[read], dest, values, &bar_characters); read++; break; - case 'C': c128_set_c(reduced[read], reduced[read + 1], dest, values, &bar_characters); - read += 2; - break; + case 'C': + c128_set_c(reduced[read], reduced[read + 1], dest, values, &bar_characters); + read += 2; + break; } } else { concat(dest, C128Table[102]);