sw/source/core/doc/gctable.cxx | 2 ++ 1 file changed, 2 insertions(+) New commits: commit 643cbc920b57a27fb4ff5227232c08afa07fdc49 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Sat Oct 12 18:55:27 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Oct 13 18:44:15 2024 +0200
cid#1608032 Overflowed constant Not sure if what the code is doing is valid, but this change fixes the underflow without changing the behaviour Change-Id: I0553968d9af71d0c5f1bd70703df923482d1a40e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174850 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx index 2c207ede9364..845fa603c8eb 100644 --- a/sw/source/core/doc/gctable.cxx +++ b/sw/source/core/doc/gctable.cxx @@ -446,6 +446,8 @@ static bool lcl_MergeGCLine(SwTableLine* pLn, GCLinePara* pGCPara) { if( !lcl_MergeGCBox( pLn->GetTabBoxes()[nLen], pGCPara )) { + if (nLen == 0) + break; --nLen; continue; }