From 8b2107ed93465c6f9c1dd647e93446354dbe3738 Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Thu, 17 Aug 2017 17:16:00 -0400 Subject: 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 Reviewed-by: dsinclair --- xfa/fde/cfde_txtedtengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xfa/fde') 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(m_ParagPtrArray); for (i = nNextParagIndex; i < nParagCount; i++) -- cgit v1.2.3