diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-10-28 10:23:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-10-28 12:14:22 +0100 |
commit | 32e98ce4bfe7eef24aa6acca83a5f22199f486f5 (patch) | |
tree | d68f3b2172037b03e86e49efc357d17155935950 | |
parent | 5c3619468a5e19bec17439fe86adc263cfc993aa (diff) |
cid#1607347 Overflowed constant
Change-Id: Idd2afe534177fc1ff2fe216b9167e0107843628f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175719
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
-rw-r--r-- | sw/source/core/crsr/pam.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index bccb0d510e98..a81a9d736b9d 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -1140,7 +1140,10 @@ void GoStartSection( SwPosition * pPos ) SwNodes& rNodes = pPos->GetNodes(); sal_uInt16 nLevel = SwNodes::GetSectionLevel( pPos->GetNode() ); if( pPos->GetNode() < *rNodes.GetEndOfContent().StartOfSectionNode() ) + { + assert(nLevel > 0); nLevel--; + } do { SwNodes::GoStartOfSection( &pPos->nNode ); } while( nLevel-- ); // already on a ContentNode |