summaryrefslogtreecommitdiff
path: root/src/bin/elementary/test_dnd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/elementary/test_dnd.c')
-rw-r--r--src/bin/elementary/test_dnd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bin/elementary/test_dnd.c b/src/bin/elementary/test_dnd.c
index 40c2c61c11..faeee2e78c 100644
--- a/src/bin/elementary/test_dnd.c
+++ b/src/bin/elementary/test_dnd.c
@@ -65,6 +65,7 @@ _drag_data_build(Eina_List **items)
65 Elm_Object_Item *it; 65 Elm_Object_Item *it;
66 const char *t; 66 const char *t;
67 unsigned int len = 0; 67 unsigned int len = 0;
68 int i = 0;
68 69
69 EINA_LIST_FOREACH(*items, l, it) 70 EINA_LIST_FOREACH(*items, l, it)
70 { 71 {
@@ -73,17 +74,20 @@ _drag_data_build(Eina_List **items)
73 len += strlen(t); 74 len += strlen(t);
74 } 75 }
75 76
76 drag_data = malloc(len + eina_list_count(*items) * (FILESEP_LEN + 1) + 1); 77 drag_data = malloc(len + eina_list_count(*items) * (FILESEP_LEN + 1));
77 strcpy((char *) drag_data, ""); 78 strcpy((char *) drag_data, "");
78 79
79 /* drag data in form: file://URI1\nfile://URI2\n */ 80 /* drag data in form: file://URI1\nfile://URI2 */
80 EINA_LIST_FOREACH(*items, l, it) 81 EINA_LIST_FOREACH(*items, l, it)
81 { 82 {
82 t = (char *)elm_object_item_data_get(it); 83 t = (char *)elm_object_item_data_get(it);
83 if (t) 84 if (t)
84 { 85 {
86 if (i > 0)
87 strcat((char *) drag_data, "\n");
85 strcat((char *) drag_data, FILESEP); 88 strcat((char *) drag_data, FILESEP);
86 strcat((char *) drag_data, t); 89 strcat((char *) drag_data, t);
90 i++;
87 } 91 }
88 } 92 }
89 } 93 }