Small logic fix -- OK to end up at border of image in this code
[zxing.git] / core / src / com / google / zxing / qrcode / detector / AlignmentPatternFinder.java
index e68d3a1..03b2fae 100644 (file)
@@ -99,7 +99,7 @@ final class AlignmentPatternFinder {
       // Burn off leading white pixels before anything else; if we start in the middle of\r
       // a white run, it doesn't make sense to count its length, since we don't know if the\r
       // white run continued to the left of the start point\r
-      while (!luminanceRow.get(j - startX) && j < maxJ) {\r
+      while (j < maxJ && !luminanceRow.get(j - startX)) {\r
         j++;\r
       }\r
       while (j < maxJ) {\r