Added a check so that the PDF417 reader can get through the partial blackbox test.
authordswitkin <dswitkin@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Sun, 13 Dec 2009 15:02:33 +0000 (15:02 +0000)
committerdswitkin <dswitkin@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Sun, 13 Dec 2009 15:02:33 +0000 (15:02 +0000)
git-svn-id: http://zxing.googlecode.com/svn/trunk@1152 59b500cc-1b3d-0410-9834-0bbf25fbcc57

core/src/com/google/zxing/pdf417/detector/Detector.java

index dabdce8..6c448d8 100644 (file)
@@ -99,6 +99,9 @@ public final class Detector {
 
       int dimension = computeDimension(vertices[4], vertices[6],
           vertices[5], vertices[7], moduleWidth);
+      if (dimension < 1) {
+        throw ReaderException.getInstance();
+      }
 
       // Deskew and sample image.
       BitMatrix bits = sampleGrid(matrix, vertices[4], vertices[5],