]> git.saurik.com Git - wxWidgets.git/commitdiff
bug in wxString::Printf() corrected (the length of the string wasn't updated
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 5 Jan 1999 22:53:29 +0000 (22:53 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 5 Jan 1999 22:53:29 +0000 (22:53 +0000)
correctly)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/string.cpp

index 9d056390460addaaaf1d1c1bd676bcabe599b3db..03e3ac1516a6fe36df13f133439612909083830c 100644 (file)
@@ -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
 }