| 1183 printf("%c", selection_data->data[i]); |
1183 printf("%c", selection_data->data[i]); |
| 1184 } |
1184 } |
| 1185 printf("\n"); |
1185 printf("\n"); |
| 1186 } |
1186 } |
| 1187 #endif |
1187 #endif |
| 1188 text = g_malloc(selection_data->length); |
1188 |
| |
1189 text = g_malloc(selection_data->length + 1); |
| 1189 memcpy(text, selection_data->data, selection_data->length); |
1190 memcpy(text, selection_data->data, selection_data->length); |
| |
1191 /* Make sure the paste data is null-terminated. Given that |
| |
1192 * we're passed length (but assume later that it is), this |
| |
1193 * seems sensible to me. |
| |
1194 */ |
| |
1195 text[selection_data->length] = '\0'; |
| 1190 } |
1196 } |
| 1191 |
1197 |
| 1192 #ifdef _WIN32 |
1198 #ifdef _WIN32 |
| 1193 if (gtk_selection_data_get_data_type(selection_data) == gdk_atom_intern("HTML Format", FALSE)) { |
1199 if (gtk_selection_data_get_data_type(selection_data) == gdk_atom_intern("HTML Format", FALSE)) { |
| 1194 char *tmp = clipboard_win32_to_html(text); |
1200 char *tmp = clipboard_win32_to_html(text); |