From 628078021b339702f7b225915f1508adef56a979 Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Wed, 20 Jun 2018 23:48:32 +0100 Subject: [PATCH] Fix typo in estimating lenth of binary data in QR Code Fixes #106 reported by Daniel Gredler --- backend/qr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/qr.c b/backend/qr.c index 623e8ed5..4749424f 100644 --- a/backend/qr.c +++ b/backend/qr.c @@ -119,7 +119,7 @@ static void define_mode(char mode[],const int jisdata[], const size_t length,con while (((mlen + i) < length) && (mode[mlen + i] == 'A')) { mlen++; }; - if (mlen < 6) { + if (mlen < 4) { for (j = 0; j < mlen; j++) { mode[i + j] = 'B'; }