diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/smallvec_type.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/smallvec_type.hpp b/src/core/smallvec_type.hpp index 38fa6fe6e..5e4e17365 100644 --- a/src/core/smallvec_type.hpp +++ b/src/core/smallvec_type.hpp @@ -225,7 +225,8 @@ public: */ FORCEINLINE const T *Get(uint index) const { - assert(index < this->items); + /* Allow access to the 'first invalid' item */ + assert(index <= this->items); return &this->data[index]; } @@ -237,7 +238,8 @@ public: */ FORCEINLINE T *Get(uint index) { - assert(index < this->items); + /* Allow access to the 'first invalid' item */ + assert(index <= this->items); return &this->data[index]; } |