OSDN Git Service
(root)
/
lha
/
lha.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58e4346
)
should start with mindepth
author
Koji Arai
<jca02266@gmail.com>
Sat, 30 Aug 2008 13:43:16 +0000
(22:43 +0900)
committer
Koji Arai
<jca02266@gmail.com>
Sat, 30 Aug 2008 13:43:16 +0000
(22:43 +0900)
When table[] is assigned with a value which is smaller than mindepth,
it is not used in tree_rebuild().
src/pm2tree.c
patch
|
blob
|
history
diff --git
a/src/pm2tree.c
b/src/pm2tree.c
index
6d66c37
..
c8d6a52
100644
(file)
--- 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<<i);
if (count[i] > max_leaves) {
error("Bad table");