X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2abb9d2f1716177aa6c0ce0fd6a2519580dc12af..62ae2780a8049aa777ccb75e14fa395024c9d80c:/src/common/dynarray.cpp diff --git a/src/common/dynarray.cpp b/src/common/dynarray.cpp index 72284fcb73..c6890ce3a0 100644 --- a/src/common/dynarray.cpp +++ b/src/common/dynarray.cpp @@ -221,7 +221,11 @@ void name::Shrink() \ memcpy(pNew, m_pItems, m_nCount*sizeof(T)); \ delete [] m_pItems; \ m_pItems = pNew; \ + \ + /* update the size of the new block */ \ + m_nSize = m_nCount; \ } \ + /* else: don't do anything, better keep old memory block! */ \ } \ } \ \