Issue #86 : Fix logic error in Code 39 that was requiring too much quiet zone

This commit is contained in:
Sean Owen 2014-03-13 14:19:08 +00:00
parent 7e419c28b1
commit f0532a2730

View file

@ -136,7 +136,7 @@ public final class Code39Reader extends OneDReader {
int whiteSpaceAfterEnd = nextStart - lastStart - lastPatternSize;
// If 50% of last pattern size, following last pattern, is not whitespace, fail
// (but if it's whitespace to the very end of the image, that's OK)
if (nextStart != end && (whiteSpaceAfterEnd >> 1) < lastPatternSize) {
if (nextStart != end && (whiteSpaceAfterEnd << 1) < lastPatternSize) {
throw NotFoundException.getNotFoundInstance();
}