diff --git a/docs/changes.txt b/docs/changes.txt index d266d58964..c6da3cf267 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -633,6 +633,7 @@ wxOSX: - Compilation fix for wxWebView under 10.10. - Fix conversion of wxBitmap to wxImage in 64 bit builds. +- Fix length of text in wxTextDataObject. - Fix using wxHTTP and wxFTP from worker thread. - Fix wxFileDialog::GetFilterIndex() for file open dialogs (phsilva). - Fix custom paper support (tijsv). diff --git a/src/common/dobjcmn.cpp b/src/common/dobjcmn.cpp index 5e4d43dcc0..10ba0a267a 100644 --- a/src/common/dobjcmn.cpp +++ b/src/common/dobjcmn.cpp @@ -284,12 +284,12 @@ bool wxTextDataObject::GetDataHere(const wxDataFormat& format, void *buf) const } bool wxTextDataObject::SetData(const wxDataFormat& format, - size_t WXUNUSED(len), const void *buf) + size_t len, const void *buf) { if ( buf == NULL ) return false; - wxWCharBuffer buffer = GetConv(format).cMB2WX( (const char*)buf ); + wxWCharBuffer buffer = GetConv(format).cMB2WC((const char*)buf, len, NULL); SetText( buffer );