diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-01-28 23:23:37 +0530 |
---|---|---|
committer | pranavk <pranavk@collabora.co.uk> | 2017-01-30 12:26:46 +0000 |
commit | 76dc7897b0efb1104dea56fe65d0aececab4eca0 (patch) | |
tree | 26b17841d00126ef84118519f279bc7ad5b5310a /sw | |
parent | d1a5c549d7908ca4b73ab9562fb3517ca1b00050 (diff) |
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@libreoffice.org>
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/edit/acorrect.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index ce1004df364c..f0f88cc4243a 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 ) |