diff options
Diffstat (limited to 'src/misc/binaryheap.hpp')
-rw-r--r-- | src/misc/binaryheap.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/misc/binaryheap.hpp b/src/misc/binaryheap.hpp index 76f93371e..55730a2ce 100644 --- a/src/misc/binaryheap.hpp +++ b/src/misc/binaryheap.hpp @@ -204,6 +204,8 @@ public: FORCEINLINE void Include(T *new_item) { if (this->IsFull()) { + assert(this->capacity < UINT_MAX / 2); + this->capacity *= 2; this->data = ReallocT<T*>(this->data, this->capacity + 1); } |