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:
parent
5c3f21c6a3
commit
9bd5c5fcda
@ -523,6 +523,7 @@ All:
|
||||
- Fix deadlock due to too many events in Unix console apps (Lukasz Michalski).
|
||||
- Added wxDir::GetNameWithSep().
|
||||
- Allow unloading wxPluginLibrary objects in any order (manyleaves).
|
||||
- Fix passing strings with embedded NULs in wxThreadEvents (sodev).
|
||||
|
||||
All (GUI):
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user