X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..56bd6aaca9d758663e202816e1861ee8674526e7:/src/msw/ole/dataobj.cpp diff --git a/src/msw/ole/dataobj.cpp b/src/msw/ole/dataobj.cpp index 950f343536..b2521b7143 100644 --- a/src/msw/ole/dataobj.cpp +++ b/src/msw/ole/dataobj.cpp @@ -39,7 +39,7 @@ #include "wx/msw/private.h" // includes -#ifdef wxUSE_NORLANDER_HEADERS +#if wxUSE_NORLANDER_HEADERS #include #endif #include @@ -506,6 +506,10 @@ STDMETHODIMP wxIDataObject::SetData(FORMATETC *pformatetc, size_t *p = (size_t *)pBuf; size = *p++; pBuf = p; + if (! format.IsStandard() ) { + // see GetData for coresponding increment + size -= sizeof(size_t); + } } }