From 2df7ccbd6d3ba4c9d62afb7693f54661b0eb66cf Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 11 Nov 2020 19:24:15 +0100 Subject: Fix another unsigned integer underflow --- src/sord.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/sord.c b/src/sord.c index 52c6e32..958a6db 100644 --- a/src/sord.c +++ b/src/sord.c @@ -253,7 +253,7 @@ sord_node_compare(const SordNode* a, const SordNode* b) if (cmp == 0) { // Note: Can't use sord_node_compare here since it does wildcards if (!a->meta.lit.datatype || !b->meta.lit.datatype) { - cmp = a->meta.lit.datatype - b->meta.lit.datatype; + cmp = (a->meta.lit.datatype < b->meta.lit.datatype) ? -1 : 1; } else { cmp = strcmp((const char*)a->meta.lit.datatype->node.buf, (const char*)b->meta.lit.datatype->node.buf); -- cgit v1.2.1