diff options
Diffstat (limited to 'sys/libbio/io')
-rw-r--r-- | sys/libbio/io/newick.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/libbio/io/newick.c b/sys/libbio/io/newick.c index f3aeb8a..0004fac 100644 --- a/sys/libbio/io/newick.c +++ b/sys/libbio/io/newick.c @@ -336,6 +336,8 @@ bio·readnewick(Stream *file, mem·Allocator heap) error dump(bio·Node *node, Stream *out) { + byte b[24]; + if (!node) { return 1; } @@ -357,8 +359,8 @@ dump(bio·Node *node, Stream *out) if (node->parent) { io·putbyte(out, ':'); - // TODO(nnoll): Format float - io·putbyte(out, '0'); + snprintf(b, arrlen(b), "%f", node->dist); + io·putstring(out, b); } return 0; |