Commit d687ddf3 authored by Jakob Leben's avatar Jakob Leben Committed by Rémi Denis-Courmont

Playlist: correct insertion index when moving items into nodes

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent ee25a62a
...@@ -691,7 +691,7 @@ static int TreeMove( playlist_t *p_playlist, playlist_item_t *p_item, ...@@ -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 * down of the playlist. So when removing the element we have
* to change the position as we loose one element * to change the position as we loose one element
*/ */
if( j < i_newpos ) if( p_detach == p_node && j < i_newpos )
i_newpos--; i_newpos--;
/* Attach to new parent */ /* Attach to new parent */
......
Markdown is supported
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