From eb04e08b0a7ee09a3b3b000343820c08fd1327f7 Mon Sep 17 00:00:00 2001 From: GAMMACASE <31375974+GAMMACASE@users.noreply.github.com> Date: Mon, 18 Aug 2025 23:50:59 +0300 Subject: [PATCH] Correct CUtlLeanVector::IsIdxValid method --- public/tier1/utlleanvector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/tier1/utlleanvector.h b/public/tier1/utlleanvector.h index b956edc2..e7a9812a 100644 --- a/public/tier1/utlleanvector.h +++ b/public/tier1/utlleanvector.h @@ -64,7 +64,7 @@ public: // Element removal void RemoveAll(); // doesn't deallocate memory - bool IsIdxValid( I i ) const { return (i >= 0) && (i < NumAllocated()); } + bool IsIdxValid( I i ) const { return (i >= 0) && (i < m_nCount); } // Memory deallocation void Purge(); @@ -286,7 +286,7 @@ public: // Element removal void RemoveAll(); // doesn't deallocate memory - bool IsIdxValid( I i ) const { return (i >= 0) && (i < NumAllocated()); } + bool IsIdxValid( I i ) const { return (i >= 0) && (i < m_nCount); } // Memory deallocation void Purge();