mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Fixing checksum error in UPC-E barcodes (#1130)
* Converting to UPC-A before checking for matching check digits
This commit is contained in:
parent
5e8c3d490f
commit
eb6bea6ed3
|
@ -64,7 +64,7 @@ public final class UPCEWriter extends UPCEANWriter {
|
|||
break;
|
||||
case 8:
|
||||
try {
|
||||
if (!UPCEANReader.checkStandardUPCEANChecksum(contents)) {
|
||||
if (!UPCEANReader.checkStandardUPCEANChecksum(UPCEReader.convertUPCEtoUPCA(contents))) {
|
||||
throw new IllegalArgumentException("Contents do not pass checksum");
|
||||
}
|
||||
} catch (FormatException ignored) {
|
||||
|
|
Loading…
Reference in a new issue