Kaydet (Commit) 22db613f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

More nEndInvalid/COMPLETE_STRING fixes

...to fix -fsanitize=signed-integer-overflow

Change-Id: Ib8dad09f1ed088c51fb417efecf662e76b2e495a
üst feb93d45
......@@ -211,7 +211,7 @@ public:
inline bool InsideInvalid( sal_Int32 nChk ) const
{ return nChk >= nBeginInvalid && nChk <= nEndInvalid; }
void SetInvalid( sal_Int32 nBegin, sal_Int32 nEnd );
inline void Validate(){ nBeginInvalid = COMPLETE_STRING; }
inline void Validate(){ nBeginInvalid = nEndInvalid = COMPLETE_STRING; }
void Invalidate( sal_Int32 nBegin, sal_Int32 nEnd );
bool InvalidateWrong();
bool Fresh( sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nPos,
......
......@@ -313,7 +313,7 @@ void SwWrongList::Move( sal_Int32 nPos, sal_Int32 nDiff )
{
if( nBeginInvalid > nPos )
nBeginInvalid += nDiff;
if( nEndInvalid >= nPos )
if( nEndInvalid >= nPos && nEndInvalid != COMPLETE_STRING )
nEndInvalid += nDiff;
}
// If the pointer is in the middle of a wrong word,
......
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