1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-19 03:56:10 +08:00

Correct CUtlRBTree::IsValidIndex

This commit is contained in:
GAMMACASE
2025-08-08 17:19:15 +03:00
parent e04ce6ecdf
commit 0d2e594354

View File

@ -587,7 +587,7 @@ inline bool CUtlRBTree<T, I, L, M>::IsValidIndex( I i ) const
if ( !m_Elements.IsIdxValid( i ) )
return false;
if ( m_Elements.IsIdxAfter( i, m_LastAlloc ) )
if ( m_Elements.IsIdxAfter( i, m_Elements.Count() - 1 ) )
return false; // don't read values that have been allocated, but not constructed
return LeftChild(i) != i;