Fix in wxArrayString::Grow to also handle situation where array is not yet
full but the nIncrement is greater than the space left. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1752,7 +1752,7 @@ void wxArrayString::Copy(const wxArrayString& src)
|
|||||||
void wxArrayString::Grow(size_t nIncrement)
|
void wxArrayString::Grow(size_t nIncrement)
|
||||||
{
|
{
|
||||||
// only do it if no more place
|
// only do it if no more place
|
||||||
if ( m_nCount == m_nSize ) {
|
if ( (m_nSize - m_nCount) < nIncrement ) {
|
||||||
// if ARRAY_DEFAULT_INITIAL_SIZE were set to 0, the initially empty would
|
// if ARRAY_DEFAULT_INITIAL_SIZE were set to 0, the initially empty would
|
||||||
// be never resized!
|
// be never resized!
|
||||||
#if ARRAY_DEFAULT_INITIAL_SIZE == 0
|
#if ARRAY_DEFAULT_INITIAL_SIZE == 0
|
||||||
|
Reference in New Issue
Block a user