mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
Bug 534869 – Length miscalculation in
2008-05-26 Richard Hult <richard@imendio.com> Bug 534869 – Length miscalculation in _gtk_quartz_get_selection_data_from_pasteboard * gtk/gtkquartz.c: (_gtk_quartz_get_selection_data_from_pasteboard): Get the number of bytes, not the number of characters, patch from Yevgen Muntyan. svn path=/trunk/; revision=20174
This commit is contained in:
parent
948fe6242a
commit
8ae8e8e307
@ -1,3 +1,12 @@
|
||||
2008-05-26 Richard Hult <richard@imendio.com>
|
||||
|
||||
Bug 534869 – Length miscalculation in
|
||||
_gtk_quartz_get_selection_data_from_pasteboard
|
||||
|
||||
* gtk/gtkquartz.c: (_gtk_quartz_get_selection_data_from_pasteboard):
|
||||
Get the number of bytes, not the number of characters, patch from
|
||||
Yevgen Muntyan.
|
||||
|
||||
2008-05-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c: Some doc formatting fixes.
|
||||
|
@ -166,12 +166,12 @@ _gtk_quartz_get_selection_data_from_pasteboard (NSPasteboard *pasteboard,
|
||||
|
||||
if (s)
|
||||
{
|
||||
int len = [s length];
|
||||
const char *utf8_string = [s UTF8String];
|
||||
|
||||
selection_data->type = target;
|
||||
selection_data->format = 8;
|
||||
selection_data->length = len;
|
||||
selection_data->data = g_memdup ([s UTF8String], len + 1);
|
||||
selection_data->length = strlen (utf8_string);
|
||||
selection_data->data = (guchar*) g_strdup (utf8_string);
|
||||
}
|
||||
}
|
||||
else if (target == gdk_atom_intern_static_string ("application/x-color"))
|
||||
|
Loading…
Reference in New Issue
Block a user