]> git.saurik.com Git - wxWidgets.git/commit - include/wx/stringimpl.h
Fix bug with assigning a part of the string to the same string
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 21 Aug 2007 16:45:41 +0000 (16:45 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 21 Aug 2007 16:45:41 +0000 (16:45 +0000)
commitd545bdede67c1f4335e6b4822dfcad3775f631fc
tree844efea13bce9ddac6c960a3802708830e1265fb
parent61a11cd6faf242c5d1c529e8fbfee39ffbf03091
Fix bug with assigning a part of the string to the same string

The fix has several parts:

1. don't free the old string data in ConcatSelf() if we use it as
   source
2. implement assign() using replace() rather than clear() + append()
3. fix replace() to work with replacement strings containing embedded
   NULs and optimize it by using memcpy() instead of byte-wise copy

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/stringimpl.h
src/common/stringimpl.cpp