From: Vadim Zeitlin Date: Tue, 5 Jan 1999 22:53:29 +0000 (+0000) Subject: bug in wxString::Printf() corrected (the length of the string wasn't updated X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/471aebdd3e7aef32773a2a99ff47f8f0cf564696 bug in wxString::Printf() corrected (the length of the string wasn't updated correctly) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- 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 }