From 44af2822a1090508c639b60c1b0c7ff1e5dc7931 Mon Sep 17 00:00:00 2001 From: Koji Arai Date: Sat, 30 Aug 2008 22:43:16 +0900 Subject: [PATCH] should start with mindepth When table[] is assigned with a value which is smaller than mindepth, it is not used in tree_rebuild(). --- src/pm2tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pm2tree.c b/src/pm2tree.c index 6d66c37..c8d6a52 100644 --- a/src/pm2tree.c +++ b/src/pm2tree.c @@ -117,7 +117,7 @@ tree_rebuild(struct tree *t, count[table[i]]++; } total = 0.0; - for (i = 1; i <= maxdepth; i++) { + for (i = mindepth; i <= maxdepth; i++) { int max_leaves = (1< max_leaves) { error("Bad table"); -- 2.11.0