BLI: add assert for negative indices in MutableSpan

Pull Request: https://projects.blender.org/blender/blender/pulls/109143
This commit is contained in:
Iliya Katueshenock
2023-06-20 09:54:32 +02:00
committed by Jacques Lucke
parent 4f3c09c5ee
commit 7b93431c2d

View File

@@ -599,7 +599,8 @@ template<typename T> class MutableSpan {
constexpr T &operator[](const int64_t index) const
{
BLI_assert(index < this->size());
BLI_assert(index >= 0);
BLI_assert(index < size_);
return data_[index];
}