mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Avoid error on malformed Aztec code
This commit is contained in:
parent
8af98a573f
commit
98bc57f5d1
|
@ -215,6 +215,9 @@ public final class Decoder {
|
|||
|
||||
int numDataCodewords = ddata.getNbDatablocks();
|
||||
int numCodewords = rawbits.length / codewordSize;
|
||||
if (numCodewords < numDataCodewords) {
|
||||
throw FormatException.getFormatInstance();
|
||||
}
|
||||
int offset = rawbits.length % codewordSize;
|
||||
int numECCodewords = numCodewords - numDataCodewords;
|
||||
|
||||
|
|
Loading…
Reference in a new issue