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:
@ -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;
|
||||
|
Reference in New Issue
Block a user