diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2018-08-16 19:21:07 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-16 19:21:07 +0000 |
commit | 5f80ff49403645dc574296bb8b29fe44a2193c3c (patch) | |
tree | e04948ad903150a81e7d8d1e4e5a9dd93e8b42eb /fxbarcode/pdf417/BC_PDF417.cpp | |
parent | f956badf3dd2c7eedba47dfcb787d6e6dfe92cf7 (diff) | |
download | pdfium-5f80ff49403645dc574296bb8b29fe44a2193c3c.tar.xz |
If rows need to overflow in a PDF417 barcode, keep it to a minimum.
By using mincols as fallback, the exact opposite is done. Maxcols
should be used instead to minimize the size.
This is important so the next fix
(https://pdfium-review.googlesource.com/c/pdfium/+/40350)
does not break a test that was working well by coincidence.
Bug: pdfium:1135
Change-Id: I95ddc547654966f655e2556c1796503a5456fb8f
Reviewed-on: https://pdfium-review.googlesource.com/40330
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'fxbarcode/pdf417/BC_PDF417.cpp')
-rw-r--r-- | fxbarcode/pdf417/BC_PDF417.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fxbarcode/pdf417/BC_PDF417.cpp b/fxbarcode/pdf417/BC_PDF417.cpp index 9b73b49a26..d0ecaccf55 100644 --- a/fxbarcode/pdf417/BC_PDF417.cpp +++ b/fxbarcode/pdf417/BC_PDF417.cpp @@ -562,14 +562,14 @@ std::vector<int32_t> CBC_PDF417::determineDimensions( } if (dimensions.empty()) { int32_t rows = calculateNumberOfRows(sourceCodeWords, - errorCorrectionCodeWords, m_minCols); + errorCorrectionCodeWords, m_maxCols); if (rows < m_minRows) { dimensions.resize(2); - dimensions[0] = m_minCols; + dimensions[0] = m_maxCols; dimensions[1] = m_minRows; } else if (rows >= 3 && rows <= 90) { dimensions.resize(2); - dimensions[0] = m_minCols; + dimensions[0] = m_maxCols; dimensions[1] = rows; } } |