From 7c5f4b54805b80ae4fa3f6d1ef562143ae616f49 Mon Sep 17 00:00:00 2001 From: etienneb Date: Mon, 25 Apr 2016 12:14:55 -0700 Subject: Fix incorrect offset computation. This issue was found by clang-tidy linter. BUG=589955 Review URL: https://codereview.chromium.org/1921713003 --- core/fpdftext/fpdf_text_int.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/fpdftext') 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 { -- cgit v1.2.3