diff options
-rw-r--r-- | sw/source/core/text/txtfrm.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 95210cfc1b7a..6e52c931c989 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -1803,7 +1803,8 @@ static void lcl_ModifyOfst(SwTextFrame & rFrame, assert(nLen != TextFrameIndex(COMPLETE_STRING)); if (rFrame.IsFollow() && nPos < rFrame.GetOfst()) { - rFrame.ManipOfst( std::max(TextFrameIndex(0), op(rFrame.GetOfst(), nLen)) ); + rFrame.ManipOfst( std::max(nPos, op(rFrame.GetOfst(), nLen)) ); + assert(sal_Int32(rFrame.GetOfst()) <= rFrame.GetText().getLength()); } } |