diff options
author | 2009-11-08 20:53:09 +0100 | |
---|---|---|
committer | 2009-11-08 20:53:09 +0100 | |
commit | a28416472f90894fb73aafc97a576bf3f7d8a011 (patch) | |
tree | c06b922dca7b7f5f5da5058bedf8e6c66de2e3a0 /gtkplaylist.c | |
parent | 25122b6bfefaf7ecade203774ffa4568b953cb15 (diff) |
fixed general drag-n-drop bug
Diffstat (limited to 'gtkplaylist.c')
-rw-r--r-- | gtkplaylist.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gtkplaylist.c b/gtkplaylist.c index 244741fe..cef45ea4 100644 --- a/gtkplaylist.c +++ b/gtkplaylist.c @@ -1362,8 +1362,9 @@ gtkpl_add_fm_dropped_files (gtkplaylist_t *ps, char *ptr, int length, int drop_y void gtkpl_handle_fm_drag_drop (gtkplaylist_t *ps, int drop_y, void *ptr, int length) { // this happens when dropped from file manager - char *mem = malloc (length); + char *mem = malloc (length+1); memcpy (mem, ptr, length); + mem[length] = 0; // we don't pass control structure, but there's only one drag-drop view currently messagepump_push (M_FMDRAGDROP, (uintptr_t)mem, length, drop_y); } |