Closes Issue #37 : don't respond to (invalid?) UPC-E codes that aren't 8 digits

This commit is contained in:
Sean Owen 2014-01-23 22:14:26 +00:00
parent d7c78074ec
commit 42cfa9ca3e

View file

@ -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;