Fixed infinite loop when using SetArraySize() or 2nd parameter of CreateArray().

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401204
This commit is contained in:
Phong Dang 2007-07-28 20:01:30 +00:00
parent e7b39faea7
commit eb0de8dad9

View File

@ -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)