From dcb75f721060de6e70ce6c1710b4ef46283167e7 Mon Sep 17 00:00:00 2001 From: Eism Date: Thu, 18 Jul 2019 14:10:06 +0200 Subject: [PATCH] reultpoints fix --- src/zxing/zxing/oned/rss/FinderPattern.cpp | 2 +- src/zxing/zxing/oned/rss/RSS14Reader.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/zxing/zxing/oned/rss/FinderPattern.cpp b/src/zxing/zxing/oned/rss/FinderPattern.cpp index 13a3698..d78ae81 100644 --- a/src/zxing/zxing/oned/rss/FinderPattern.cpp +++ b/src/zxing/zxing/oned/rss/FinderPattern.cpp @@ -10,7 +10,7 @@ FinderPattern::FinderPattern(int value, std::vector startEnd, int start, in { ArrayRef< Ref > resultPoints(2); resultPoints[0] = Ref(new OneDResultPoint(start, rowNumber)); - resultPoints[0] = Ref(new OneDResultPoint(end, rowNumber)); + resultPoints[1] = Ref(new OneDResultPoint(end, rowNumber)); m_resultPoints = resultPoints; } diff --git a/src/zxing/zxing/oned/rss/RSS14Reader.cpp b/src/zxing/zxing/oned/rss/RSS14Reader.cpp index cced013..b08f289 100644 --- a/src/zxing/zxing/oned/rss/RSS14Reader.cpp +++ b/src/zxing/zxing/oned/rss/RSS14Reader.cpp @@ -110,7 +110,12 @@ Ref RSS14Reader::constructResult(Pair leftPair, Pair rightPair) const ArrayRef< Ref > leftPoints = leftPair.getFinderPattern().getResultPoints(); ArrayRef< Ref > rightPoints = rightPair.getFinderPattern().getResultPoints(); - ArrayRef< Ref > resultPoints(5); + + ArrayRef< Ref > resultPoints(4); + resultPoints[0] = leftPoints[0]; + resultPoints[1] = leftPoints[1]; + resultPoints[2] = rightPoints[0]; + resultPoints[3] = rightPoints[1]; return Ref(new Result( Ref(new String(buffer)),