diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-12-06 11:24:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-12-06 12:14:11 +0100 |
commit | 31d0c99c31be9a83cb8dae9c7555f27083b3320c (patch) | |
tree | 180818e234d2554fca1aad6cecf2b6b6d2719f66 /sw | |
parent | e7268b7d9e4ee79785116d1d80942cec8f035aae (diff) |
add assert in SwNodes::ForEach
to catch any dodgy code
Change-Id: Iffd0612b28871c864f103634a40d13b82160d1ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177955
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/docnode/nodes.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index e11ee0ce49d8..c74731f48927 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -2275,6 +2275,7 @@ SwNode* SwNodes::FindPrvNxtFrameNode( const SwNode& rFrameNd, void SwNodes::ForEach( SwNodeOffset nStart, SwNodeOffset nEnd, FnForEach_SwNodes fn, void* pArgs ) { + assert( nEnd <= SwNodeOffset(m_nSize) ); if( nEnd > SwNodeOffset(m_nSize) ) nEnd = SwNodeOffset(m_nSize); |