[Libreoffice-commits] core.git: sw/source
Pranav Kant
pranavk at collabora.co.uk
Mon Jan 30 12:27:15 UTC 2017
sw/source/core/edit/acorrect.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 76dc7897b0efb1104dea56fe65d0aececab4eca0
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>
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index ce1004d..f0f88cc 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