From e9f14a30e25af191474cdff84617ac0483839d08 Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Fri, 20 Oct 2017 18:19:19 +0100 Subject: [PATCH] Don't reduce length of input if not cropping BOM --- backend/library.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/library.c b/backend/library.c index 02ebfbc2..f2542c29 100644 --- a/backend/library.c +++ b/backend/library.c @@ -821,9 +821,9 @@ void strip_bom(unsigned char *source, int *input_length) { for (i = 3; i < *input_length; i++) { source[i - 3] = source[i]; } + *input_length -= 3; } } - *input_length -= 3; } int ZBarcode_Encode(struct zint_symbol *symbol, const unsigned char *source,int in_length) {