[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - sw/source
Pranav Kant
pranavk at collabora.co.uk
Fri Sep 1 11:57:33 UTC 2017
sw/source/core/edit/acorrect.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit f55b8571f3bd4b8b04004c2e0dd2017876207f97
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Sat Jan 28 23:23:37 2017 +0530
tdf#105103 assertion failure crash
New document, insert mode on, press space (when autocorrect while
typing is on)
Change-Id: I54bc9a5cd1f9d8ef877eeca81d7d85ccd90e354a
Reviewed-on: https://gerrit.libreoffice.org/33651
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: pranavk <pranavk at collabora.co.uk>
(cherry picked from commit 76dc7897b0efb1104dea56fe65d0aececab4eca0)
Reviewed-on: https://gerrit.libreoffice.org/41786
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index afc4d1832b45..6f116275ce10 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -164,7 +164,7 @@ bool SwAutoCorrDoc::ReplaceRange( sal_Int32 nPos, sal_Int32 nSourceLength, const
// text attributes with dummy characters must not be replaced!
bool bDoReplace = true;
sal_Int32 const nLen = rText.getLength();
- for ( sal_Int32 n = 0; n < nLen; ++n )
+ for ( sal_Int32 n = 0; n < nLen && n + nPos < pNd->GetText().getLength(); ++n )
{
sal_Unicode const Char = pNd->GetText()[n + nPos];
if ( ( CH_TXTATR_BREAKWORD == Char || CH_TXTATR_INWORD == Char )
More information about the Libreoffice-commits
mailing list