mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Issue #862 : avoid invalid codeword from bad EC number estimate
This commit is contained in:
parent
9068f64eb5
commit
c89470b2b0
|
@ -244,8 +244,10 @@ public final class PDF417ScanningDecoder {
|
|||
}
|
||||
barcodeMatrix01.setValue(calculatedNumberOfCodewords);
|
||||
} else if (numberOfCodewords[0] != calculatedNumberOfCodewords) {
|
||||
// The calculated one is more reliable as it is derived from the row indicator columns
|
||||
barcodeMatrix01.setValue(calculatedNumberOfCodewords);
|
||||
if (calculatedNumberOfCodewords >= 1 && calculatedNumberOfCodewords <= PDF417Common.MAX_CODEWORDS_IN_BARCODE) {
|
||||
// The calculated one is more reliable as it is derived from the row indicator columns
|
||||
barcodeMatrix01.setValue(calculatedNumberOfCodewords);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue