summaryrefslogtreecommitdiff
path: root/src/UriCommon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/UriCommon.c')
-rw-r--r--src/UriCommon.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/UriCommon.c b/src/UriCommon.c
index c50d89b..8b043f4 100644
--- a/src/UriCommon.c
+++ b/src/UriCommon.c
@@ -98,7 +98,15 @@ int URI_FUNC(CompareRange)(
return -1;
}
- return URI_STRNCMP(a->first, b->first, (a->afterLast - a->first));
+ diff = URI_STRNCMP(a->first, b->first, (a->afterLast - a->first));
+
+ if (diff > 0) {
+ return 1;
+ } else if (diff < 0) {
+ return -1;
+ }
+
+ return diff;
}