mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Closes Issue #37 : don't respond to (invalid?) UPC-E codes that aren't 8 digits
This commit is contained in:
parent
d7c78074ec
commit
42cfa9ca3e
|
@ -43,7 +43,7 @@ public final class ProductResultParser extends ResultParser {
|
|||
|
||||
String normalizedProductID;
|
||||
// Expand UPC-E for purposes of searching
|
||||
if (format == BarcodeFormat.UPC_E) {
|
||||
if (format == BarcodeFormat.UPC_E && rawText.length() == 8) {
|
||||
normalizedProductID = UPCEReader.convertUPCEtoUPCA(rawText);
|
||||
} else {
|
||||
normalizedProductID = rawText;
|
||||
|
|
Loading…
Reference in a new issue