mirror of
https://github.com/attractivechaos/klib
synced 2024-11-23 14:49:50 +03:00
Merge pull request #52 from ihh/master
Fixed output bug where leaf branch length is not printed
This commit is contained in:
commit
c5c637a3a9
8
knhx.c
8
knhx.c
@ -133,7 +133,13 @@ static void format_node_recur(const knhx1_t *node, const knhx1_t *p, kstring_t *
|
||||
sprintf(numbuf, ":%g", p->d);
|
||||
kputsn(numbuf, strlen(numbuf), s);
|
||||
}
|
||||
} else kputsn(p->name, strlen(p->name), s);
|
||||
} else {
|
||||
kputsn(p->name, strlen(p->name), s);
|
||||
if (p->d >= 0) {
|
||||
sprintf(numbuf, ":%g", p->d);
|
||||
kputsn(numbuf, strlen(numbuf), s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void kn_format(const knhx1_t *node, int root, kstring_t *s) // TODO: get rid of recursion
|
||||
|
Loading…
Reference in New Issue
Block a user