aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
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 5e70cebf..122f51f3 100644
--- a/src/node.c
+++ b/src/node.c
@@ -350,7 +350,7 @@ serd_node_new_decimal(const double d, const unsigned frac_digits)
SerdNode
serd_node_new_integer(const int64_t i)
{
- uint64_t abs_i = (i < 0) ? -i : i;
+ uint64_t abs_i = (uint64_t)((i < 0) ? -i : i);
const unsigned digits = serd_digits((double)abs_i);
char* buf = (char*)calloc(digits + 2, 1);
SerdNode node = {(const uint8_t*)buf, 0, 0, 0, SERD_LITERAL};