aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-04-04 20:22:24 +0000
committerDavid Robillard <d@drobilla.net>2015-04-04 20:22:24 +0000
commit4976746ca753f736dbf3c5f9f019d134d139b284 (patch)
tree9ebdeae50420937979998f5ac0937547d514ed07 /src/node.c
parenteeda53ddd85534b8fb9e520c3a704ceee70a027a (diff)
downloadserd-4976746ca753f736dbf3c5f9f019d134d139b284.tar.gz
serd-4976746ca753f736dbf3c5f9f019d134d139b284.tar.bz2
serd-4976746ca753f736dbf3c5f9f019d134d139b284.zip
Fix serializing fractional decimals that would round up.
git-svn-id: http://svn.drobilla.net/serd/trunk@489 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node.c b/src/node.c
index 6b35dd79..1f8cb115 100644
--- a/src/node.c
+++ b/src/node.c
@@ -219,7 +219,7 @@ serd_node_new_uri(const SerdURI* uri, const SerdURI* base, SerdURI* out)
static inline unsigned
serd_digits(double abs)
{
- const double lg = ceil(log10(abs + 1.0));
+ const double lg = ceil(log10(floor(abs) + 1.0));
return lg < 1.0 ? 1U : (unsigned)lg;
}