Commit 416883ac authored by Sergios - Anestis Kefalidis's avatar Sergios - Anestis Kefalidis
Browse files

Regression: URL drag-n-drop adding rubbish characters (Issue #196)

parent 4e747efe
Pipeline #15130 failed with stages
in 1 minute and 32 seconds
......@@ -489,7 +489,7 @@ terminal_widget_drag_data_received (GtkWidget *widget,
guint info,
guint time)
{
const guchar *ucs;
const gunichar2 *ucs;
GdkRGBA color;
GString *str;
GValue value = { 0, };
......@@ -539,8 +539,8 @@ terminal_widget_drag_data_received (GtkWidget *widget,
else
{
str = g_string_new (NULL);
ucs = gtk_selection_data_get_data (selection_data);
for (n = 0; n < gtk_selection_data_get_length (selection_data) && ucs[n] != '\n'; ++n)
ucs = (const gunichar2 *) gtk_selection_data_get_data (selection_data);
for (n = 0; n < gtk_selection_data_get_length (selection_data) / 2 && ucs[n] != '\n'; ++n)
g_string_append_unichar (str, ucs[n]);
filename = g_filename_from_uri (str->str, NULL, NULL);
if (filename != NULL)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment