From f79cf03477b454d4a41e2f404aae5d90170e3e80 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 10 Mar 2003 18:11:15 +0000 Subject: [PATCH] fixed a serious bug in Shrink() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + src/common/dynarray.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 7b71798fdc..5d74743a8d 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -186,6 +186,7 @@ wxBase - compilation with wxUSE_ODBC=1 fixed (dbkeyg.h file was missing in the archive) - bug in wxDateTime with timezones on systems with tm_gmtoff in struct tm fixed +- fixed bug in wxArray::Shrink() (Seth Manley) wxGTK: diff --git a/src/common/dynarray.cpp b/src/common/dynarray.cpp index 4d0ee51d28..25a80d3860 100644 --- a/src/common/dynarray.cpp +++ b/src/common/dynarray.cpp @@ -189,6 +189,7 @@ void name::Shrink() \ memcpy(pNew, m_pItems, m_nCount*sizeof(T)); \ delete [] m_pItems; \ m_pItems = pNew; \ + m_nSize = m_nCount; \ } \ } \ } \