sw/source/core/frmedt/feshview.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 901483b8d846d22e9ef7bba48e521209fb450c5e Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Sat Oct 12 18:59:10 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Oct 13 12:20:26 2024 +0200 cid#1606581 Overflowed constant Change-Id: Ie00405c54a7f65fe5e852508dc2df5faeae1ca3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174851 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 1dc47d379e81..3e76f6c59830 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -1078,7 +1078,9 @@ void SwFEShell::SelectionToBottom( bool bBottom ) = pFormat->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()) if (auto pPage = pDrwModel->GetPage(0)) { - const auto pNextObj = pPage->SetObjectOrdNum(pObj->GetOrdNum() - 1, pObj->GetOrdNum() - 1); + sal_uInt32 nOrdNum = pObj->GetOrdNum(); + assert(nOrdNum > 0); + const auto pNextObj = pPage->SetObjectOrdNum(nOrdNum - 1, nOrdNum - 1); // If there is a lower object (not null)... if (pNextObj) {