From 29d8911c6bc884efb7bff706d15c977e9d7aea89 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 11 Jul 2019 20:20:50 +0200 Subject: [PATCH] Fix Vector::erase(). --- server/TracyVector.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/TracyVector.hpp b/server/TracyVector.hpp index 61f2f05e..d8bac44c 100644 --- a/server/TracyVector.hpp +++ b/server/TracyVector.hpp @@ -176,7 +176,7 @@ public: assert( m_capacity != std::numeric_limits::max() ); assert( it >= m_ptr && it <= m_ptr + m_size ); m_size--; - memmove( it, it+1, m_size * sizeof( T ) ); + memmove( it, it+1, ( m_size - ( it - m_ptr ) ) * sizeof( T ) ); return it; }