fixed out-of-bounds OUString access

Change-Id: I971c339f2cb4cddcf4fbb447eb79282d34979220
This commit is contained in:
Eike Rathke
2013-10-16 21:52:18 +02:00
parent 31d3ab5ea1
commit f46cb0c45a

View File

@@ -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;
}