Kaydet (Commit) f7e2f18e authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

avoid segfault when nBrekPos is past the end

Change-Id: Ieedc24c0443ba10d8277cd6327b3b735203e5d45
üst fcf4b4c3
......@@ -1708,8 +1708,9 @@ void TextEngine::ImpBreakLine( sal_uLong nPara, TextLine* pLine, TETextPortion*,
pLine->SetEnd( nBreakPos );
sal_uInt16 nEndPortion = SplitTextPortion( nPara, nBreakPos );
bool bBlankSeparator = ( ( nBreakPos >= pLine->GetStart() ) &&
( pNode->GetText()[ nBreakPos ] == ' ' ) );
bool bBlankSeparator = ( nBreakPos >= pLine->GetStart() &&
nBreakPos < pNode->GetText().getLength() &&
pNode->GetText()[ nBreakPos ] == ' ' );
if ( bBlankSeparator )
{
// generally suppress blanks at the end of line
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment