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:
@@ -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
|
||||
|
Reference in New Issue
Block a user