From 5bdcaf43db06abda8095edb1d18c39ff77af26ba Mon Sep 17 00:00:00 2001 From: Matej Sekoranja Date: Wed, 4 Dec 2013 10:49:16 +0100 Subject: [PATCH] sharedVector: count > capacity bugfix (2) --- pvDataApp/misc/sharedVector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvDataApp/misc/sharedVector.h b/pvDataApp/misc/sharedVector.h index c59c89e..ad181b7 100644 --- a/pvDataApp/misc/sharedVector.h +++ b/pvDataApp/misc/sharedVector.h @@ -360,7 +360,7 @@ public: size_t new_count = std::min(this->m_count, i); _E_non_const* temp=new _E_non_const[i]; try{ - std::copy(begin(), end(), temp); + std::copy(begin(), begin()+new_count, temp); this->m_data.reset(temp, detail::default_array_deleter()); }catch(...){ delete[] temp;