size of a text data object in the clipboard, otherwise we have to
subtract it when the data is requested and that results in truncating
one byte for other data formats.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38354
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
wxCharBuffer buffer = GetConv(format).cWX2MB( GetText().c_str() );
- return buffer ? strlen( buffer ) + 1 : 0;
+ return buffer ? strlen( buffer ) : 0;
}
bool wxTextDataObject::GetDataHere(const wxDataFormat& format, void *buf) const
gtk_selection_data_set_text(
selection_data,
(const gchar*)d,
- size-1 );
+ size );
}
else
{
GDK_SELECTION_TYPE_STRING,
8*sizeof(gchar),
(unsigned char*) d,
- size-1 );
+ size );
}
free(d);
GDK_SELECTION_TYPE_STRING,
8 * sizeof(gchar),
(unsigned char*) d,
- size-1 );
+ size );
free(d);
}