X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e2a3cc0c34b6a54a31bc684368740704453356b8..471aebdd3e7aef32773a2a99ff47f8f0cf564696:/src/common/string.cpp diff --git a/src/common/string.cpp b/src/common/string.cpp index 9d05639046..03e3ac1516 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -345,6 +345,10 @@ void wxString::AllocBeforeWrite(size_t nLen) pData->Unlock(); AllocBuffer(nLen); } + else { + // update the string length + pData->nDataLength = nLen; + } wxASSERT( !GetStringData()->IsShared() ); // we must be the only owner }