BLI: add assert for negative indices in MutableSpan
Pull Request: https://projects.blender.org/blender/blender/pulls/109143
This commit is contained in:
committed by
Jacques Lucke
parent
4f3c09c5ee
commit
7b93431c2d
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user