summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2017-08-17 17:16:00 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-21 14:36:55 +0000
commit8b2107ed93465c6f9c1dd647e93446354dbe3738 (patch)
tree50cac01116c0fd7cfa84aaa1b41986d3ba9b3d75
parente20e80a3662de4e2c798ad74f1d509c1c0b4097b (diff)
downloadpdfium-8b2107ed93465c6f9c1dd647e93446354dbe3738.tar.xz
Fixing crash on delete or backspace in XFA text edit box.
Bug: pdfium:872 Change-Id: Ib7f0e3708cea2d16d7536ae26777ddc48d7e2c1d Reviewed-on: https://pdfium-review.googlesource.com/11370 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
-rw-r--r--xfa/fde/cfde_txtedtengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp
index 9877d87fb4..5c0d1e7d79 100644
--- a/xfa/fde/cfde_txtedtengine.cpp
+++ b/xfa/fde/cfde_txtedtengine.cpp
@@ -731,7 +731,7 @@ void CFDE_TxtEdtEngine::Inner_DeleteRange(int32_t nStart, int32_t nCount) {
pParag = m_ParagPtrArray[ParagPosBgn.nParagIndex].get();
pParag->SetTextLength(nTotalCharCount - nCount);
pParag->CalcLines();
- nTotalLineCount -= pParag->GetTextLength();
+ nTotalLineCount -= pParag->GetLineCount();
}
int32_t nParagCount = pdfium::CollectionSize<int32_t>(m_ParagPtrArray);
for (i = nNextParagIndex; i < nParagCount; i++)