diff --git a/src/zxing/zxing/oned/MultiFormatUPCEANReader.cpp b/src/zxing/zxing/oned/MultiFormatUPCEANReader.cpp index fbff86b..330c218 100644 --- a/src/zxing/zxing/oned/MultiFormatUPCEANReader.cpp +++ b/src/zxing/zxing/oned/MultiFormatUPCEANReader.cpp @@ -92,7 +92,8 @@ Ref MultiFormatUPCEANReader::decodeRow(int rowNumber, Ref row, // here, and convert an EAN-13 result to a UPC-A result if // appropriate. bool ean13MayBeUPCA = - result->getBarcodeFormat() == BarcodeFormat::EAN_13 && + (result->getBarcodeFormat() == BarcodeFormat::UPC_A || + result->getBarcodeFormat() == BarcodeFormat::EAN_13) && result->getText()->charAt(0) == '0'; // Note: doesn't match Java which uses hints