This problem shows itself on windows and seems to be
caused by line 1603 in OleDND.cpp:
dataObj = TkDND_CreateDataObjAccordingToType
(dnd->DesiredTypeStr, NULL,
(unsigned char*) str, strlen(str));
here we see a TCL data object being created from an
unknown type, but the size of the type(byte-array) is
determined using strlen, which assumes the data is null
terminated. Unfortunaltly our data is not null terminated
and uses the first four bytes to store the size of the data
in little endian format. I end up with a one byte
long 'string' :-(
The solution, I think is to perhaps use:
GlobalSize(stgMedium.hGlobal);
which instead of strlen, to get the actual size of memory
allocated by the drop source.
In the meantime I'm changing our data to be null
terminated.
Logged In: YES
user_id=92283
Yes, it is true that data is assumed to be NULL terminated.
However the solution seems more logical.
The only problem is that I don't know
windows enough to know that I can request the size.
It will be fixed as soon as possible :-)