diff --git a/core/CellArray.h b/core/CellArray.h index 038de834..0f88f072 100644 --- a/core/CellArray.h +++ b/core/CellArray.h @@ -112,7 +112,14 @@ public: m_Size = count; return true; } - return GrowIfNeeded(m_Size - count); + + if(!GrowIfNeeded(count - m_Size)) + { + return false; + } + + m_Size = count; + return true; } private: bool GrowIfNeeded(size_t count)