summaryrefslogtreecommitdiff
path: root/core/fpdftext/fpdf_text_int.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdftext/fpdf_text_int.cpp')
-rw-r--r--core/fpdftext/fpdf_text_int.cpp2
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 {