Issue 412
[zxing.git] / core / src / com / google / zxing / qrcode / QRCodeReader.java
index 575af1f..33c50b8 100644 (file)
@@ -118,6 +118,9 @@ public class QRCodeReader implements Reader {
     }
 
     int moduleSize = x - leftTopBlack[0];
+    if (moduleSize == 0) {
+      throw NotFoundException.getNotFoundInstance();
+    }
 
     // And now find where the rightmost black module on the first row ends
     int rowEndOfSymbol = width - 1;
@@ -159,4 +162,4 @@ public class QRCodeReader implements Reader {
     return bits;
   }
 
-}
\ No newline at end of file
+}