summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-05-11 16:03:13 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-05-11 16:04:57 +0200
commitf0a520421247de3345e2039ed6bc0e642aa52a8e (patch)
tree324289899ab62d0698748cae659a7894eb9ca9aa /sw
parent705b217c9c966319071305f415442cb2a0c46d66 (diff)
RtfAttributeOutput::EndTableCell: fix integer underflow
Regression from commit 1f77a5e, caused an ~infinite loop with the bugdoc from fdo#45522. With this fix, the bugdoc "just" crashes again. Change-Id: Idb0282d1606351498c9148343b9578d2b3642acf
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index b3da71658f36..e5ebc52525fc 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -960,7 +960,8 @@ void RtfAttributeOutput::EndTableCell( )
m_bTableCellOpen = false;
m_bTblAfterCell = true;
m_bWroteCellInfo = false;
- m_aCells[m_nTableDepth]--;
+ if (m_aCells[m_nTableDepth] > 0)
+ m_aCells[m_nTableDepth]--;
}
void RtfAttributeOutput::EndTableRow( )