summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utf8.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/utf8.c b/utf8.c
index 3f703ae8..4efb2ea6 100644
--- a/utf8.c
+++ b/utf8.c
@@ -742,6 +742,14 @@ u8_strcasecmp (const char *a, const char *b) {
p1 += i1;
p2 += i2;
}
+
+ if (*p1 == 0) {
+ return -1;
+ }
+ else if (*p2 == 0) {
+ return 1;
+ }
+
return 0;
}