summaryrefslogtreecommitdiff
path: root/core/fpdftext/cpdf_textpage.cpp
diff options
context:
space:
mode:
authorAndrew Weintraub <asweintraub@google.com>2017-10-23 14:38:01 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-23 19:03:40 +0000
commit25e763e99932a4d12cbd51b3c36411b44163c5d8 (patch)
tree420cfcdc3d8f0e6748bf93af6555e9076f8ea924 /core/fpdftext/cpdf_textpage.cpp
parent0e187d80179fe63c11cfb710ecd18b95b39dfa10 (diff)
downloadpdfium-25e763e99932a4d12cbd51b3c36411b44163c5d8.tar.xz
Fix cpdf_textpage so it doesn't omit spaces.
Bug: pdfium:921 Change-Id: I8864fd2ebdccc5f94aaf70cd8295068bf4db8b68 Reviewed-on: https://pdfium-review.googlesource.com/16492 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fpdftext/cpdf_textpage.cpp')
-rw-r--r--core/fpdftext/cpdf_textpage.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp
index fd33fb2f2f..82778b1658 100644
--- a/core/fpdftext/cpdf_textpage.cpp
+++ b/core/fpdftext/cpdf_textpage.cpp
@@ -1355,9 +1355,7 @@ CPDF_TextPage::GenerateCharacter CPDF_TextPage::ProcessInsertObject(
}
WideString PrevStr =
m_pPreTextObj->GetFont()->UnicodeFromCharCode(PrevItem.m_CharCode);
- if (PrevStr.IsEmpty())
- return GenerateCharacter::None;
- wchar_t preChar = PrevStr[PrevStr.GetLength() - 1];
+ wchar_t preChar = PrevStr.Last();
CFX_Matrix matrix = pObj->GetTextMatrix();
matrix.Concat(formMatrix);