mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Issue 982 maybe avoid an AIOOBE
git-svn-id: https://zxing.googlecode.com/svn/trunk@1933 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
92adf1a6d5
commit
a58c072099
|
@ -199,10 +199,11 @@ final class BitMatrixParser {
|
||||||
}
|
}
|
||||||
if (columnNumber > 0) {
|
if (columnNumber > 0) {
|
||||||
int cw = getCodeword(symbol);
|
int cw = getCodeword(symbol);
|
||||||
// if (debug) System.out.println(" " + Long.toBinaryString(symbol) +
|
|
||||||
// " cw=" +cw + " ColumnNumber=" +columnNumber + "i=" +i);
|
|
||||||
if (cw < 0 && i < width - MODULES_IN_SYMBOL) {
|
if (cw < 0 && i < width - MODULES_IN_SYMBOL) {
|
||||||
// Skip errors on the Right row indicator column
|
// Skip errors on the Right row indicator column
|
||||||
|
if (eraseCount >= erasures.length) {
|
||||||
|
throw FormatException.getFormatInstance();
|
||||||
|
}
|
||||||
erasures[eraseCount] = next;
|
erasures[eraseCount] = next;
|
||||||
next++;
|
next++;
|
||||||
eraseCount++;
|
eraseCount++;
|
||||||
|
@ -212,8 +213,6 @@ final class BitMatrixParser {
|
||||||
} else {
|
} else {
|
||||||
// Left row indicator column
|
// Left row indicator column
|
||||||
int cw = getCodeword(symbol);
|
int cw = getCodeword(symbol);
|
||||||
// if (debug) System.out.println(" " + Long.toBinaryString(symbol) +
|
|
||||||
// " cw=" +cw + " ColumnNumber=" +columnNumber + "i=" +i);
|
|
||||||
if (ecLevel < 0) {
|
if (ecLevel < 0) {
|
||||||
switch (rowNumber % 3) {
|
switch (rowNumber % 3) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
Loading…
Reference in a new issue