summaryrefslogtreecommitdiff
path: root/src/dynamic-array.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dynamic-array.hpp')
-rw-r--r--src/dynamic-array.hpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dynamic-array.hpp b/src/dynamic-array.hpp
index 1c99b4c..978e291 100644
--- a/src/dynamic-array.hpp
+++ b/src/dynamic-array.hpp
@@ -57,6 +57,7 @@ template <typename T> inline DynArray<T>::~DynArray() {
template <typename T> inline T &DynArray<T>::operator[](std::size_t index) {
assert(index < this->elementCount && "Invalid DynArray<T>[] index - out of bounds");
assert(index < this->reservedCount && "Invalid DynArray<T>[] index - out of reserved bounds");
+ assert(index < 0xF000000000000000 && "Invalid DynArray<T>[] index - unlikely value");
return *reinterpret_cast<T *>((this->ptr + (sizeof(T) * index)));
}