summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-09-17 10:53:27 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-09-17 20:31:31 +0200
commit0fda9371ce530d1c79e6eb404afd7127371f7975 (patch)
tree89d5ef124fdc629ddb476460de38561c3c7e7e82 /sw/source
parent4017cb924304d040df8a2ed51f72f9fec28f810a (diff)
cid#1608032 Overflowed constant
Change-Id: I4b74a139483ff932e71102ec73ab6d352e533245 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173554 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/doc/gctable.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx
index 30937cadd541..2c207ede9364 100644
--- a/sw/source/core/doc/gctable.cxx
+++ b/sw/source/core/doc/gctable.cxx
@@ -441,9 +441,16 @@ static bool lcl_MergeGCLine(SwTableLine* pLn, GCLinePara* pGCPara)
}
// ATTENTION: The number of boxes can change!
- for( SwTableBoxes::size_type nLen = 0; nLen < pLn->GetTabBoxes().size(); ++nLen )
+ SwTableBoxes::size_type nLen = 0;
+ while (nLen < pLn->GetTabBoxes().size())
+ {
if( !lcl_MergeGCBox( pLn->GetTabBoxes()[nLen], pGCPara ))
+ {
--nLen;
+ continue;
+ }
+ ++nLen;
+ }
}
return true;
}