# HG changeset patch # User Yoshiki Yazawa # Date 1210421706 0 # Node ID 22f8b5512ef4d3431b890e5c08b5b34beda0e0bc # Parent 2c6fb4d5cea256c79e02aaa0b2fd9a366fb3e9b1 - text to feed gtk_selection_data_set() should include trailing '\0' - removed unused code diff -r 2c6fb4d5cea2 -r 22f8b5512ef4 pidgin/gtkimhtml.c --- a/pidgin/gtkimhtml.c Sat May 10 10:08:26 2008 +0000 +++ b/pidgin/gtkimhtml.c Sat May 10 12:15:06 2008 +0000 @@ -952,8 +952,6 @@ if (info == TARGET_HTML) { char *selection; #ifndef _WIN32 - gsize len; - GString *str = g_string_new(NULL); if (primary) { text = gtk_imhtml_get_markup_range(imhtml, &start, &end); } else @@ -968,7 +966,7 @@ /* xxx should remove following line --yaz */ purple_debug_info("imhtml clipboard", "html_clipboard: %s len = %d\n", text, strlen(text)); gtk_selection_data_set(selection_data, gdk_atom_intern("text/html", FALSE), - 8, (const guchar *)text, strlen(text)); + 8, (const guchar *)text, strlen(text)+1); // include trailing '\0' --yaz #else /*_WIN32 */ selection = clipboard_html_to_win32(html_clipboard); gtk_selection_data_set(selection_data, gdk_atom_intern("HTML Format", FALSE),