Issue 412
authorsrowen@gmail.com <srowen@gmail.com@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Thu, 20 May 2010 10:50:34 +0000 (10:50 +0000)
committersrowen@gmail.com <srowen@gmail.com@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Thu, 20 May 2010 10:50:34 +0000 (10:50 +0000)
git-svn-id: http://zxing.googlecode.com/svn/trunk@1376 59b500cc-1b3d-0410-9834-0bbf25fbcc57

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
+}