]> git.saurik.com Git - wxWidgets.git/commitdiff
pass size in bytes, not wchars, to SetData() in wxURLDataObject::SetURL() (fixes...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 29 Mar 2009 21:30:28 +0000 (21:30 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 29 Mar 2009 21:30:28 +0000 (21:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/ole/dataobj.cpp

index 07884ba7ede2f9f8609e4bb6e72e7e3380383a3e..e112f436e8c8591b4517a7bacd08c830e5c4e7f8 100644 (file)
@@ -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
 }