[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Tue Apr 7 07:15:46 PDT 2015
sw/source/filter/inc/wrtswtbl.hxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 4498bc4483c4a37b5ffaa649fa148ef3d381d399
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Apr 7 15:08:58 2015 +0100
fix assert on export of fdo77716-1.docx to odt
SwWriteTableCols becomes unsorted because rCol.nPos is < COLFUZZY
and it is unsigned so integer overflow on comparison. Just just move rhs
subtract to lhs add.
Change-Id: Ie037e8ba914a4c00e51d9dd1e0a0af9e1f4d353b
diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx
index 9aa2a66..e14261d 100644
--- a/sw/source/filter/inc/wrtswtbl.hxx
+++ b/sw/source/filter/inc/wrtswtbl.hxx
@@ -204,7 +204,7 @@ inline bool SwWriteTableCol::operator<( const SwWriteTableCol& rCol ) const
{
// Da wir hier nur die Wahrheits-Grade 0 und 1 kennen, lassen wir lieber
// auch nicht zu, dass x==y und x<y gleichzeitig gilt ;-)
- return nPos < rCol.nPos - COLFUZZY;
+ return nPos + COLFUZZY < rCol.nPos;
}
struct SwWriteTableColLess {
More information about the Libreoffice-commits
mailing list