diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2019-03-06 22:01:15 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2019-03-07 13:28:39 +0100 |
commit | 67d170868401335434772f1be23d565d23c1fbea (patch) | |
tree | 1ccdd0d35cbcc7931e655017b09c1c5002f5d768 /editeng/source/misc | |
parent | 0d8c670797f6becc584cf2eca4f414df7a3d0d85 (diff) |
tdf#121686: fix assert in SvxAutoCorrect::FnChgToEnEmDash (editeng)
See https://bugs.documentfoundation.org/attachment.cgi?id=149773
Change-Id: I1696984a8df1b38a359a8177a5f3670526d2696e
Reviewed-on: https://gerrit.libreoffice.org/68832
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'editeng/source/misc')
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 658ada0bed31..7261be47291d 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -544,7 +544,8 @@ bool SvxAutoCorrect::FnChgToEnEmDash( sal_Unicode cCh = rTxt[ nSttPos ]; if( '-' == cCh ) { - if( ' ' == rTxt[ nSttPos-1 ] && + if( 1 < nEndPos - nSttPos && + ' ' == rTxt[ nSttPos-1 ] && '-' == rTxt[ nSttPos+1 ]) { sal_Int32 n; |