From 68fdc6024e93d3161b6b61387212af116b607997 Mon Sep 17 00:00:00 2001 From: Project Nayuki Date: Thu, 23 Nov 2017 06:38:25 +0000 Subject: [PATCH] Fixed a bug in the alphanumeric mode encoder function. --- src/io/nayuki/fastqrcodegen/QrSegment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io/nayuki/fastqrcodegen/QrSegment.java b/src/io/nayuki/fastqrcodegen/QrSegment.java index 91f0545..d897a2c 100644 --- a/src/io/nayuki/fastqrcodegen/QrSegment.java +++ b/src/io/nayuki/fastqrcodegen/QrSegment.java @@ -75,7 +75,7 @@ public final class QrSegment { char c = text.charAt(i); if (c >= ALPHANUMERIC_MAP.length || ALPHANUMERIC_MAP[c] == -1) throw new IllegalArgumentException("String contains unencodable characters in alphanumeric mode"); - accumData = accumData * 10 + ALPHANUMERIC_MAP[c]; + accumData = accumData * 45 + ALPHANUMERIC_MAP[c]; accumCount++; if (accumCount == 2) { bb.appendBits(accumData, 11);