]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/ole/dataobj.cpp
fixed bug #976725: "RETURN closes dialog instead of combobox dropdown" (applied fix...
[wxWidgets.git] / src / msw / ole / dataobj.cpp
index 14da1ff70ce7c3a3cf071a4cb1b6d51c4594b0f0..48377785a47076133793e3b75a4004e440dabb16 100644 (file)
@@ -1037,13 +1037,13 @@ size_t wxFileDataObject::GetDataSize() const
         return 0;
 
     // inital size of DROPFILES struct + null byte
-    size_t sz = sizeof(DROPFILES) + 1;
+    size_t sz = sizeof(DROPFILES) + (1 * sizeof(wxChar));
 
     size_t count = m_filenames.GetCount();
     for ( size_t i = 0; i < count; i++ )
     {
         // add filename length plus null byte
-        sz += m_filenames[i].Len() + 1;
+        sz += (m_filenames[i].Len() + 1) * sizeof(wxChar);
     }
 
     return sz;