changeset 27838:22f8b5512ef4

- text to feed gtk_selection_data_set() should include trailing '\0' - removed unused code
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 10 May 2008 12:15:06 +0000
parents 2c6fb4d5cea2
children 7b8f5dd30a82
files pidgin/gtkimhtml.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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),