From cd2ba3124602ad9ee8f5927c385936cc5319808d Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Tue, 26 May 2015 13:38:22 +0200 Subject: unbreak calc again Change-Id: I13e80fc04cb35aff9efbe63cd0096bff5d177ffa --- editeng/source/misc/svxacorr.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 77e0774e2c46..76e10acc631f 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -2826,7 +2826,8 @@ const SvxAutocorrWord* SvxAutocorrWordList::WordMatches(const SvxAutocorrWord *p sal_Int32 nSttWdPos = nEndPos; // direct replacement of keywords surrounded by colons (for example, ":name:") - bool bColonNameColon = rTxt[nEndPos] == ':' && rChk[0] == ':' && rChk.endsWith(":"); + bool bColonNameColon = rTxt.getLength() > nEndPos && + rTxt[nEndPos] == ':' && rChk[0] == ':' && rChk.endsWith(":"); if ( nEndPos + (bColonNameColon ? 1 : 0) >= rChk.getLength() - left_wildcard - right_wildcard ) { -- cgit