git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35256
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
Ptr dataPtr = new char[dataSize] ;
m_data->GetDataHere( formats[i] , dataPtr ) ;
OSType type = formats[i].GetFormatId() ;
Ptr dataPtr = new char[dataSize] ;
m_data->GetDataHere( formats[i] , dataPtr ) ;
OSType type = formats[i].GetFormatId() ;
+ if ( type == 'TEXT' || type == 'utxt' )
+ if ( dataSize > 0 )
+ dataSize-- ;
dataPtr[ dataSize ] = 0 ;
dataPtr[ dataSize ] = 0 ;
- wxString st( (wxChar*) dataPtr ) ;
- wxCharBuffer buf = st.mb_str( wxConvLocal) ;
- AddDragItemFlavor(theDrag, theItem, type , buf.data(), strlen(buf), 0);
+ if ( type == 'utxt' )
+ {
+ if ( dataSize > 0 )
+ dataSize-- ;
+ dataPtr[ dataSize ] = 0 ;
+ }
+ AddDragItemFlavor(theDrag, theItem, type , dataPtr, dataSize, 0);
}
else if (type == kDragFlavorTypeHFS )
{
}
else if (type == kDragFlavorTypeHFS )
{