Fixed bug in Grow function (possibly not allocating enough memory if starting
with empty array). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1762,6 +1762,8 @@ void wxArrayString::Grow(size_t nIncrement)
|
||||
if ( m_nSize == 0 ) {
|
||||
// was empty, alloc some memory
|
||||
m_nSize = ARRAY_DEFAULT_INITIAL_SIZE;
|
||||
if (m_nSize < nIncrement)
|
||||
m_nSize = nIncrement;
|
||||
m_pItems = new wxChar *[m_nSize];
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user