Added a check so that the PDF417 reader can get through the partial blackbox test.

git-svn-id: https://zxing.googlecode.com/svn/trunk@1152 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
dswitkin 2009-12-13 15:02:33 +00:00
parent 04ffa93742
commit b21dd14d9b

View file

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