Fix length check - it would be out of bounds.

Change-Id: I5430fed06ea1a81a68ddfaafa595d7d5b0167f3b
This commit is contained in:
Jan Holesovsky 2013-05-15 15:03:27 +02:00
parent 0a330eb740
commit 18b9aa7280

View file

@ -402,7 +402,7 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu
sal_Unicode n = rValue[ 0 ];
if ( ( n == '+' ) || ( n == '-' ) )
{
if ( !rValue.isEmpty() )
if ( rValue.getLength() > 1 )
n = rValue[ 1 ];
}
if ( ( n >= '0' ) && ( n <= '9' ) )
@ -1063,7 +1063,6 @@ Reference< XFastContextHandler > Path2DContext::createFastChildContext( sal_Int3
break;
case A_TOKEN( lnTo ) :
{
if ( !mrSegments.empty() && ( mrSegments.back().Command == EnhancedCustomShapeSegmentCommand::LINETO ) )
mrSegments.back().Count++;
else