mirror of
https://github.com/zxing/zxing.git
synced 2024-11-10 04:54:04 -08:00
Issue 311 fix
git-svn-id: https://zxing.googlecode.com/svn/trunk@1174 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
40ceee408a
commit
c7a5b5f0a9
|
@ -420,10 +420,11 @@ public final class Code128Reader extends OneDReader {
|
||||||
// Check for ample whitespace following pattern, but, to do this we first need to remember that
|
// Check for ample whitespace following pattern, but, to do this we first need to remember that
|
||||||
// we fudged decoding CODE_STOP since it actually has 7 bars, not 6. There is a black bar left
|
// we fudged decoding CODE_STOP since it actually has 7 bars, not 6. There is a black bar left
|
||||||
// to read off. Would be slightly better to properly read. Here we just skip it:
|
// to read off. Would be slightly better to properly read. Here we just skip it:
|
||||||
while (row.get(nextStart)) {
|
int width = row.getSize();
|
||||||
|
while (nextStart < width && row.get(nextStart)) {
|
||||||
nextStart++;
|
nextStart++;
|
||||||
}
|
}
|
||||||
if (!row.isRange(nextStart, Math.min(row.getSize(), nextStart + (nextStart - lastStart) / 2),
|
if (!row.isRange(nextStart, Math.min(width, nextStart + (nextStart - lastStart) / 2),
|
||||||
false)) {
|
false)) {
|
||||||
throw ReaderException.getInstance();
|
throw ReaderException.getInstance();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue