cui/source/tabpages/tabstpge.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit 4a361fdf9c0ec4f16862eca3b90ac4daea1a2a10 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Sep 17 10:50:24 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Sep 17 18:42:45 2024 +0200 cid#1608125 Overflowed constant Change-Id: Iec74e8824eab7d9e49ebe4d46912a717a3990c92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173553 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index 558a537ef7d3..3b4ca844f095 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -324,7 +324,8 @@ void SvxTabulatorTabPage::InitTabPos_Impl( sal_uInt16 nTabPos ) } // Correct current TabPos and default tabs - for ( sal_uInt16 i = 0; i < aNewTabs->Count(); i++ ) + sal_uInt16 i = 0; + while (i < aNewTabs->Count()) { if ( (*aNewTabs)[i].GetAdjustment() != SvxTabAdjust::Default ) { @@ -333,8 +334,10 @@ void SvxTabulatorTabPage::InitTabPos_Impl( sal_uInt16 nTabPos ) } else { - aNewTabs->Remove( i-- ); + aNewTabs->Remove(i); + continue; } + ++i; } // Select current tabulator