summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-11 19:24:15 +0100
committerDavid Robillard <d@drobilla.net>2020-11-11 19:24:32 +0100
commit2df7ccbd6d3ba4c9d62afb7693f54661b0eb66cf (patch)
tree05c6c9049a157576b861439f465eab42f2af8412 /src
parent0b9b41242f69644c43dc29861c9a4ac6d8768423 (diff)
downloadsord-2df7ccbd6d3ba4c9d62afb7693f54661b0eb66cf.tar.gz
sord-2df7ccbd6d3ba4c9d62afb7693f54661b0eb66cf.tar.bz2
sord-2df7ccbd6d3ba4c9d62afb7693f54661b0eb66cf.zip
Fix another unsigned integer underflow
Diffstat (limited to 'src')
-rw-r--r--src/sord.c2
1 files changed, 1 insertions, 1 deletions
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);