From 86a0071f091072a7c28782e62fd937eef3d0ceaf Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Mon, 14 Aug 2017 07:47:50 +0100 Subject: [PATCH] Show correct ECC in function information --- backend/hanxin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/hanxin.c b/backend/hanxin.c index 303c04d4..a83723d2 100644 --- a/backend/hanxin.c +++ b/backend/hanxin.c @@ -1500,7 +1500,7 @@ int han_xin(struct zint_symbol *symbol, const unsigned char source[], size_t len } for (i = 0; i < 2; i++) { - if (ecc_level & (0x02 >> i)) { + if ((ecc_level - 1) & (0x02 >> i)) { function_information[i + 8] = '1'; } else { function_information[i + 8] = '0';