Don't add spurious NULs at the end of wxTextDataObject text under OS X.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 10 Sep 2010 19:28:52 +0000 (19:28 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 10 Sep 2010 19:28:52 +0000 (19:28 +0000)
commit5dea30b3095e97ec18640105e598ff47cc2484ea
tree1eeaf6a8c122a52c195804680b7fa790fab3ba57
parent3e4f133a43e6333e59543aa20a77ddb6d884e508
Don't add spurious NULs at the end of wxTextDataObject text under OS X.

For some reason we added an extra NUL character to the data copied from
wxTextDataObject but this doesn't seem necessary because the Pasteboard API
is passed the correct data size and so the string doesn't need to be
NUL-terminated.

In fact, adding this NUL broke drag and drop between wx and native controls,
including the case of dropping text in our own wxTextCtrl as this uses its
built in support for dnd and not our code (the fact that we can't even set a
drop target for a wxTextCtrl is a separate bug). In this case we got a string
with an extra NUL in the control resulting in all sorts of hard to debug
problems.

So simply don't add the extra bytes, dnd works fine without them both between
wx windows and from/to another OS X applications.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65510 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/common/dobjcmn.cpp