From cd924f8c33fc3010c7b8a330d045043b4447ff77 Mon Sep 17 00:00:00 2001 From: "Matias N. Goldberg" Date: Thu, 22 Aug 2024 22:00:50 -0300 Subject: [PATCH] [Regression] Fix bitset64::setAllUntil assert false positive Regression happened in ceb7def5324dd28742f8a5ab8879419cb5aaa732 --- OgreMain/include/OgreBitset.inl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OgreMain/include/OgreBitset.inl b/OgreMain/include/OgreBitset.inl index b5d2aab6518..71cebae24b4 100644 --- a/OgreMain/include/OgreBitset.inl +++ b/OgreMain/include/OgreBitset.inl @@ -54,7 +54,7 @@ namespace Ogre OGRE_TEMPL_DECL void cbitsetN::setAllUntil( size_t position ) { - OGRE_ASSERT_MEDIUM( position < _N ); + OGRE_ASSERT_MEDIUM( position <= _N ); const size_t numValuesFullSet = position >> _bits; @@ -228,7 +228,7 @@ namespace Ogre //------------------------------------------------------------------------- void bitset64::setAllUntil( size_t position ) { - OGRE_ASSERT_MEDIUM( position < mBitsCapacity ); + OGRE_ASSERT_MEDIUM( position <= mBitsCapacity ); const size_t numValuesFullSet = position >> 6u; @@ -284,7 +284,7 @@ namespace Ogre //------------------------------------------------------------------------- size_t bitset64::numBitsSet( const size_t positionEnd ) const { - OGRE_ASSERT_MEDIUM( positionEnd < mBitsCapacity ); + OGRE_ASSERT_MEDIUM( positionEnd <= mBitsCapacity ); size_t retVal = 0u; for( size_t i = 0u; i < positionEnd; ) {