[Libreoffice-commits] core.git: sw/source
Stephan Bergmann
sbergman at redhat.com
Tue Nov 11 05:36:41 PST 2014
sw/source/core/text/wrong.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit c244d8fee1382d0705dc911895bed4078d1e71cb
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Nov 11 14:36:14 2014 +0100
Yet more nEndInvalid/COMPLETE_STRING fixes
...to fix -fsanitize=signed-integer-overflow
Change-Id: I713dabd49b5a6085b2e40510540a20441f0c3541
diff --git a/sw/source/core/text/wrong.cxx b/sw/source/core/text/wrong.cxx
index 680c6d0..145f1a5 100644
--- a/sw/source/core/text/wrong.cxx
+++ b/sw/source/core/text/wrong.cxx
@@ -302,7 +302,8 @@ void SwWrongList::Move( sal_Int32 nPos, sal_Int32 nDiff )
else
{
ShiftLeft( nBeginInvalid, nPos, nEnd );
- ShiftLeft( nEndInvalid, nPos, nEnd );
+ if( nEndInvalid != COMPLETE_STRING )
+ ShiftLeft( nEndInvalid, nPos, nEnd );
_Invalidate( nPos ? nPos - 1 : nPos, nPos + 1 );
}
}
@@ -471,7 +472,8 @@ SwWrongList* SwWrongList::SplitList( sal_Int32 nSplitPos )
else
{
ShiftLeft( nBeginInvalid, 0, nSplitPos );
- ShiftLeft( nEndInvalid, 0, nSplitPos );
+ if( nEndInvalid != COMPLETE_STRING )
+ ShiftLeft( nEndInvalid, 0, nSplitPos );
_Invalidate( 0, 1 );
}
for (nLst = 0; nLst < Count(); ++nLst )
More information about the Libreoffice-commits
mailing list