summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/app/inputhdl.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 72bfec865a47..c35d3d6059b0 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -956,7 +956,8 @@ void ScInputHandler::ShowTipCursor()
{
sal_uInt16 nPosition = 0;
OUString aText = pEngine->GetWord( 0, aSel.nEndPos-1 );
- if( aText[ aSel.nEndPos-1 ] == '=' )
+ /* XXX: dubious, what is this condition supposed to exactly match? */
+ if (aSel.nEndPos <= aText.getLength() && aText[ aSel.nEndPos-1 ] == '=')
{
break;
}