From 1911b288658d1b182b5bc686ed9ff5b14cb8130a Mon Sep 17 00:00:00 2001 From: Boris Zentner Date: Sun, 22 May 2016 22:52:29 +0200 Subject: [PATCH] Fix off by one error in code_49 --- backend/code49.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/code49.c b/backend/code49.c index 2a8784ef..49347979 100644 --- a/backend/code49.c +++ b/backend/code49.c @@ -208,10 +208,10 @@ int code_49(struct zint_symbol *symbol, unsigned char source[], const int length } if (M != 0) { + codeword_count--; for (i = 0; i < codeword_count; i++) { codewords[i] = codewords[i + 1]; } - codeword_count--; } if (codeword_count > 49) { @@ -335,4 +335,4 @@ int code_49(struct zint_symbol *symbol, unsigned char source[], const int length symbol->border_width = 2; return 0; -} \ No newline at end of file +}