diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-01-28 23:23:37 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-02-18 00:52:03 +0100 |
commit | 7ed2bf4bdce5140f31137ccb7117bccd5f454445 (patch) | |
tree | 4f8f4b4690146b2c47dd110e253e211c9c3dc144 | |
parent | cfa76fb15da89cd57dfe95148ef2b0b1a8f368bb (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>
(cherry picked from commit 76dc7897b0efb1104dea56fe65d0aececab4eca0)
-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 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 ) |