From a523395dfa48143e558df634ac8d11328c092329 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 29 Mar 2009 21:30:28 +0000 Subject: [PATCH] pass size in bytes, not wchars, to SetData() in wxURLDataObject::SetURL() (fixes wxURLDataObject after r59391) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/ole/dataobj.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/msw/ole/dataobj.cpp b/src/msw/ole/dataobj.cpp index 07884ba7ed..e112f436e8 100644 --- a/src/msw/ole/dataobj.cpp +++ b/src/msw/ole/dataobj.cpp @@ -1256,7 +1256,8 @@ void wxURLDataObject::SetURL(const wxString& url) } #if wxUSE_UNICODE - SetData(wxDF_UNICODETEXT, url.length() + 1, url.wc_str()); + // notice that SetData() takes size in bytes + SetData(wxDF_UNICODETEXT, (url.length() + 1)*sizeof(wxChar), url.wc_str()); #endif }