Fixed a bug in the alphanumeric mode encoder function.

pull/134/head
Project Nayuki 7 years ago
parent 2fc396a607
commit 68fdc6024e

@ -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);

Loading…
Cancel
Save