From ff4ea3106fa11e2027c24837cd4f9f67b0463929 Mon Sep 17 00:00:00 2001 From: GAMMACASE <31375974+GAMMACASE@users.noreply.github.com> Date: Fri, 8 Aug 2025 17:19:15 +0300 Subject: [PATCH] Correct CUtlRBTree::IsValidIndex --- public/tier1/utlrbtree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/tier1/utlrbtree.h b/public/tier1/utlrbtree.h index ba287375..0b1c7324 100644 --- a/public/tier1/utlrbtree.h +++ b/public/tier1/utlrbtree.h @@ -587,7 +587,7 @@ inline bool CUtlRBTree::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;