diff options
author | etienneb <etienneb@chromium.org> | 2016-04-25 12:14:55 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-25 12:14:55 -0700 |
commit | 7c5f4b54805b80ae4fa3f6d1ef562143ae616f49 (patch) | |
tree | 71b350ed57ede1ac3dea9c4306579661cb3080c8 /core | |
parent | b6853cfe4fd1ee089dfdd0cb09bbc4063532ef82 (diff) | |
download | pdfium-7c5f4b54805b80ae4fa3f6d1ef562143ae616f49.tar.xz |
Fix incorrect offset computation.
This issue was found by clang-tidy linter.
BUG=589955
Review URL: https://codereview.chromium.org/1921713003
Diffstat (limited to 'core')
-rw-r--r-- | core/fpdftext/fpdf_text_int.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fpdftext/fpdf_text_int.cpp b/core/fpdftext/fpdf_text_int.cpp index 92c4097fc3..b3558ff2a8 100644 --- a/core/fpdftext/fpdf_text_int.cpp +++ b/core/fpdftext/fpdf_text_int.cpp @@ -909,7 +909,7 @@ void CPDF_TextPage::OnPiece(CFX_BidiChar* pBidi, CFX_WideString& str) { CFX_BidiChar::Segment seg = pBidi->GetSegmentInfo(); if (seg.direction == CFX_BidiChar::RIGHT) { for (int i = seg.start + seg.count; i > seg.start; i--) { - m_TextBuf.AppendChar(str.GetAt(i - i)); + m_TextBuf.AppendChar(str.GetAt(i - 1)); m_CharList.push_back(m_TempCharList[i - 1]); } } else { |