From 131a75838cc3bf3e8222280fdc007e72c1ec3d05 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Tue, 31 Oct 2023 12:13:23 -0400 Subject: DynArray - backwards assert --- src/dynamic-array.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dynamic-array.hpp') diff --git a/src/dynamic-array.hpp b/src/dynamic-array.hpp index e5567f4..1df9300 100644 --- a/src/dynamic-array.hpp +++ b/src/dynamic-array.hpp @@ -166,7 +166,7 @@ template inline T DynArray::Pop() { } template inline void DynArray::Remove(std::size_t index, int64_t count) { - assert(index >= this->elementCount && "Invalid DynArray::Remove() - Out of bounds"); + assert(index <= this->elementCount && "Invalid DynArray::Remove() - Out of bounds"); int64_t moveCount = (this->elementCount - index - count); assert(moveCount >= 0 && "Invalid DynArray::Remove() - Removing too many elements"); assert(moveCount <= this->elementCount - index && "Invalid DynArray::Remove() - Removing too many elements"); -- cgit v1.2.3