summaryrefslogtreecommitdiff
path: root/ustring.c
diff options
context:
space:
mode:
Diffstat (limited to 'ustring.c')
-rw-r--r--ustring.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ustring.c b/ustring.c
index 17ef3bd..e6e648d 100644
--- a/ustring.c
+++ b/ustring.c
@@ -48,6 +48,9 @@ wchar_t *ustrcpy(wchar_t *dest, wchar_t *source) {
}
int ustrcmp(wchar_t *lhs, wchar_t *rhs) {
+ if (!lhs && !rhs) return 0;
+ if (!lhs) return -1;
+ if (!rhs) return +1;
while (*lhs && *rhs && *lhs==*rhs)
lhs++, rhs++;
if (*lhs < *rhs)