X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bf5d9fa4ea9f668eb45a0c5b48d6e35216e3c699..dc302518e6bf48326d202475bf78874fedcb2d9c:/src/msw/ole/dataobj.cpp diff --git a/src/msw/ole/dataobj.cpp b/src/msw/ole/dataobj.cpp index 14da1ff70c..48377785a4 100644 --- a/src/msw/ole/dataobj.cpp +++ b/src/msw/ole/dataobj.cpp @@ -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;