mirror of https://github.com/status-im/qzxing.git
If the decoded text is of type EAN_13 or UPC_A, remove the first character as it exists twice. Fixes #110
This commit is contained in:
parent
9eac8518ac
commit
c5bb5f2730
|
@ -92,7 +92,8 @@ Ref<Result> MultiFormatUPCEANReader::decodeRow(int rowNumber, Ref<BitArray> row,
|
||||||
// here, and convert an EAN-13 result to a UPC-A result if
|
// here, and convert an EAN-13 result to a UPC-A result if
|
||||||
// appropriate.
|
// appropriate.
|
||||||
bool ean13MayBeUPCA =
|
bool ean13MayBeUPCA =
|
||||||
result->getBarcodeFormat() == BarcodeFormat::EAN_13 &&
|
(result->getBarcodeFormat() == BarcodeFormat::UPC_A ||
|
||||||
|
result->getBarcodeFormat() == BarcodeFormat::EAN_13) &&
|
||||||
result->getText()->charAt(0) == '0';
|
result->getText()->charAt(0) == '0';
|
||||||
|
|
||||||
// Note: doesn't match Java which uses hints
|
// Note: doesn't match Java which uses hints
|
||||||
|
|
Loading…
Reference in New Issue