]> git.sesse.net Git - vlc/commitdiff
Playlist: correct insertion index when moving items into nodes
authorJakob Leben <jakob.leben@gmail.com>
Sun, 2 Aug 2009 12:13:41 +0000 (14:13 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 8 Aug 2009 17:24:41 +0000 (20:24 +0300)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
src/playlist/item.c

index b95fc423beee8fc8ab1c609bf169bfa357905920..23cff64735f6393b2826be72cb9227183a68e6a0 100644 (file)
@@ -691,7 +691,7 @@ static int TreeMove( playlist_t *p_playlist, playlist_item_t *p_item,
      * down of the playlist. So when removing the element we have
      * to change the position as we loose one element
      */
-    if( j < i_newpos )
+    if( p_detach == p_node && j < i_newpos )
         i_newpos--;
 
     /* Attach to new parent */