Kaydet (Commit) 5989c572 authored tarafından Michael Stahl's avatar Michael Stahl

sw: assert that index is valid in SwFntObj::DrawText()

If nCnt = 0 the only thing that will happen is an infinite loop.

Change-Id: I23c5d0ff9d36fbfb3eabc93476fe3ca1c558f91c
üst e488c8d9
......@@ -1531,7 +1531,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
sal_Int32 nCnt = rInf.GetText().getLength();
if ( nCnt < rInf.GetIdx() )
nCnt = 0;
assert(false); // layout bug, not handled below
else
nCnt = nCnt - rInf.GetIdx();
nCnt = std::min<sal_Int32>( nCnt, rInf.GetLen() );
......
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