From 8e0e3ac1481ea8c84aa2a0dbfb23bbb3d7700a0c Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 24 Oct 1999 17:14:16 +0000 Subject: Macros; \- for nonbreaking hyphen [originally from svn r252] --- ustring.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ustring.c') 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) -- cgit v1.1