From 849e6414113de21bb98748a911d1ece106c743b8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 30 Aug 2003 20:55:43 +0000 Subject: [PATCH] set array size correctly in wxArrayString::Shrink() (bug 797758) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@23308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + src/common/string.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 4545359ed0..6d6f5ee13f 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -187,6 +187,7 @@ All: - wxRegEx::Compile() now calculates the number of groups correctly - wxHTTP::GetHeader() didn't find headers which not all in upper case - wxString::find_last_of() ignored "start" parameter (Robert Vazan) +- a bug in wxArrayString::Shrink() fixed (Gunnar Roth) All (GUI): diff --git a/src/common/string.cpp b/src/common/string.cpp index 38e26e586e..136f46f224 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -1902,6 +1902,7 @@ void wxArrayString::Shrink() memcpy(pNew, m_pItems, m_nCount*sizeof(wxChar *)); delete [] m_pItems; m_pItems = pNew; + m_nSize = m_nCount; } }