Commit b9a8c6fc authored by Jakob Leben's avatar Jakob Leben

core playlist: fix my mistake in [4eff5692]

Applied from c35e504a
parent 4a31d472
...@@ -821,9 +821,6 @@ static int RecursiveAddIntoParent ( ...@@ -821,9 +821,6 @@ static int RecursiveAddIntoParent (
if( !p_new_item ) return i_pos; if( !p_new_item ) return i_pos;
i_pos++; i_pos++;
//Swap parent for new item, if we will recurse
if( b_children ) p_parent = p_new_item;
} }
//Recurse if any children //Recurse if any children
if( b_children ) if( b_children )
...@@ -831,7 +828,9 @@ static int RecursiveAddIntoParent ( ...@@ -831,7 +828,9 @@ static int RecursiveAddIntoParent (
//Substitute p_new_item for first child leaf //Substitute p_new_item for first child leaf
//(If flat, continue counting from current position) //(If flat, continue counting from current position)
int i_last_pos = RecursiveAddIntoParent( int i_last_pos = RecursiveAddIntoParent(
p_playlist, p_parent, p_child_node, p_playlist,
p_new_item ? p_new_item : p_parent,
p_child_node,
( b_flat ? i_pos : 0 ), ( b_flat ? i_pos : 0 ),
b_flat, b_flat,
&p_new_item ); &p_new_item );
......
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