From fd83552f637d243bdf0547d82d7774338f3e23d8 Mon Sep 17 00:00:00 2001 From: Vincent Danjean <Vincent.Danjean@ens-lyon.org> Date: Wed, 31 Oct 2012 15:46:34 +0000 Subject: [PATCH] Fix depth computation git-svn-id: svn+ssh://imag/users/huron/danjean/svnroot/claire/altree/trunk@451 cf695345-040a-0410-a956-b889e835fe2e --- progs/altree | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/progs/altree b/progs/altree index 794f30b..4d17d88 100755 --- a/progs/altree +++ b/progs/altree @@ -678,11 +678,12 @@ sub computeTreeStructure($) { push @leafList, $node; } } - if (scalar(@childNodeList) > 1) { - $depth++; - } if (scalar(@childNodeList) > 0) { - $computeLeaf->(\@childNodeList, $depth); + my $rec_depth=$depth; + if (scalar(@childNodeList) > 1) { + $rec_depth++; + } + $computeLeaf->(\@childNodeList, $rec_depth); } foreach my $node (@leafList) { push @leaf_refs, $node; -- GitLab