diff --git a/uppsrc/Core/Vcont.hpp b/uppsrc/Core/Vcont.hpp index f8a96940d..a163f0f97 100644 --- a/uppsrc/Core/Vcont.hpp +++ b/uppsrc/Core/Vcont.hpp @@ -162,7 +162,7 @@ void Vector::SetCount(int n, const T& init) { template void Vector::SetCountR(int n) { Chk(); - if(n + items > alloc) + if(n > alloc) ReAllocF(alloc + ntl_max(alloc, n - items)); SetCount(n); } diff --git a/uppsrc/CtrlLib/ArrayCtrl.cpp b/uppsrc/CtrlLib/ArrayCtrl.cpp index 98c48c10c..a955510cc 100644 --- a/uppsrc/CtrlLib/ArrayCtrl.cpp +++ b/uppsrc/CtrlLib/ArrayCtrl.cpp @@ -1755,7 +1755,6 @@ void ArrayCtrl::Add() { InvalidateCache(i); RefreshRow(i); } - } void ArrayCtrl::Add(const Vector& v)