sd/source/ui/view/viewshel.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 1f59a5d59083c1aa5a54133cb4bad4c5540d35c9
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Sep 11 09:37:28 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Sep 11 17:16:19 2024 +0200

    cid#1607446 silence Overflowed constant
    
    Change-Id: I175a7b4808641797efec33151353d0164921aa86
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173188
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 442ce20a553b..eaa08183fc86 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -1378,8 +1378,11 @@ void ViewShell::ImpSidUndo(SfxRequest& rReq)
             {
                 // when UndoStack is cleared by ModifyPageUndoAction
                 // the nCount may have changed, so test GetUndoActionCount()
-                while(nNumber-- && pUndoManager->GetUndoActionCount())
+                while (nNumber && pUndoManager->GetUndoActionCount())
+                {
                     pUndoManager->Undo();
+                    --nNumber;
+                }
             }
             catch( const Exception& )
             {

Reply via email to