From 7ad339627c07578aca65187c13595752c4ba073d Mon Sep 17 00:00:00 2001 From: hooper114 Date: Tue, 23 Jun 2009 19:00:59 +0000 Subject: [PATCH] Code 11 correction by John Tarbotton --- backend/code.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/code.c b/backend/code.c index b3067d75..945960d7 100644 --- a/backend/code.c +++ b/backend/code.c @@ -117,7 +117,10 @@ int code_11(struct zint_symbol *symbol, unsigned char source[]) /* Draw main body of barcode */ for(i = 0; i < ustrlen(source); i++) { lookup(NASET, C11Table, source[i], dest); - weight[i] = ctoi(source[i]); + if(source[i] == '-') + weight[i] = 10; + else + weight[i] = ctoi(source[i]); } /* Calculate C checksum */