diff --git a/core/src/com/google/zxing/qrcode/decoder/BitMatrixParser.java b/core/src/com/google/zxing/qrcode/decoder/BitMatrixParser.java index d8eaad91b..9d131a554 100644 --- a/core/src/com/google/zxing/qrcode/decoder/BitMatrixParser.java +++ b/core/src/com/google/zxing/qrcode/decoder/BitMatrixParser.java @@ -70,13 +70,13 @@ final class BitMatrixParser { // Read the top-right/bottom-left pattern too int dimension = bitMatrix.getHeight(); int formatInfoBits2 = 0; - int iMin = dimension - 8; - for (int i = dimension - 1; i >= iMin; i--) { - formatInfoBits2 = copyBit(i, 8, formatInfoBits2); - } - for (int j = dimension - 7; j < dimension; j++) { + int jMin = dimension - 7; + for (int j = dimension - 1; j >= jMin; j--) { formatInfoBits2 = copyBit(8, j, formatInfoBits2); } + for (int i = dimension - 8; i < dimension; i++) { + formatInfoBits2 = copyBit(i, 8, formatInfoBits2); + } parsedFormatInfo = FormatInformation.decodeFormatInformation(formatInfoBits1, formatInfoBits2); if (parsedFormatInfo != null) { diff --git a/core/test/data/blackbox/qrcode-2/34.png b/core/test/data/blackbox/qrcode-2/34.png new file mode 100644 index 000000000..de1c45f18 Binary files /dev/null and b/core/test/data/blackbox/qrcode-2/34.png differ diff --git a/core/test/data/blackbox/qrcode-2/34.txt b/core/test/data/blackbox/qrcode-2/34.txt new file mode 100644 index 000000000..d83e8aa31 --- /dev/null +++ b/core/test/data/blackbox/qrcode-2/34.txt @@ -0,0 +1 @@ +http://www.google.com/ \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode-2/35.png b/core/test/data/blackbox/qrcode-2/35.png new file mode 100644 index 000000000..c33f1a3b2 Binary files /dev/null and b/core/test/data/blackbox/qrcode-2/35.png differ diff --git a/core/test/data/blackbox/qrcode-2/35.txt b/core/test/data/blackbox/qrcode-2/35.txt new file mode 100644 index 000000000..d83e8aa31 --- /dev/null +++ b/core/test/data/blackbox/qrcode-2/35.txt @@ -0,0 +1 @@ +http://www.google.com/ \ No newline at end of file diff --git a/core/test/src/com/google/zxing/qrcode/QRCodeBlackBox2TestCase.java b/core/test/src/com/google/zxing/qrcode/QRCodeBlackBox2TestCase.java index de42d311e..8c9ebf781 100644 --- a/core/test/src/com/google/zxing/qrcode/QRCodeBlackBox2TestCase.java +++ b/core/test/src/com/google/zxing/qrcode/QRCodeBlackBox2TestCase.java @@ -27,10 +27,10 @@ public final class QRCodeBlackBox2TestCase extends AbstractBlackBoxTestCase { public QRCodeBlackBox2TestCase() { super("test/data/blackbox/qrcode-2", new MultiFormatReader(), BarcodeFormat.QR_CODE); - addTest(27, 27, 0.0f); - addTest(27, 27, 90.0f); - addTest(27, 27, 180.0f); - addTest(26, 26, 270.0f); + addTest(29, 29, 0.0f); + addTest(29, 29, 90.0f); + addTest(29, 29, 180.0f); + addTest(28, 28, 270.0f); } }