// 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
// 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++;
}
- if (!row.isRange(nextStart, Math.min(row.getSize(), nextStart + (nextStart - lastStart) / 2),
+ if (!row.isRange(nextStart, Math.min(width, nextStart + (nextStart - lastStart) / 2),
false)) {
throw ReaderException.getInstance();
}