Commit d549e5a0 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Correctly count the children of a node. The previous code counted the...

Correctly count the children of a node. The previous code counted the endpoints too, which gave a too high children count.
parent b010250d
......@@ -247,13 +247,15 @@ int playlist_NodeChildrenCount( playlist_t *p_playlist, playlist_item_t*p_node)
{
int i;
int i_nb = 0;
if( p_node->i_children == -1 )
return 0;
i_nb = p_node->i_children;
for( i=0 ; i< p_node->i_children;i++ )
{
if( p_node->pp_children[i]->i_children == -1 )
i_nb++;
break;;
else
i_nb += playlist_NodeChildrenCount( p_playlist,
p_node->pp_children[i] );
......
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