Use wxString::Clone() instead of c_str() in wxThreadEvent copy ctor.

Creating a new wxString from c_str() of the old one resulted in dropping all
string data after the first embedded NUL. Fix this by using Clone() method
that exists specifically for this purpose. It also makes the code more clear.

Closes #14380.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-06-08 18:44:14 +00:00
parent 5c3f21c6a3
commit 9bd5c5fcda
2 changed files with 2 additions and 1 deletions

View File

@@ -1244,7 +1244,7 @@ public:
{
// make sure our string member (which uses COW, aka refcounting) is not
// shared by other wxString instances:
SetString(GetString().c_str());
SetString(GetString().Clone());
}
virtual wxEvent *Clone() const