From f9a76ce1ab269d7bc31943a7301968e5580c618f Mon Sep 17 00:00:00 2001 From: Mark Valence Date: Mon, 19 Feb 2001 19:09:54 +0000 Subject: [PATCH] Bug fix and Windows compat change. --- libraries/liblunicode/ucdata/ucdata.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libraries/liblunicode/ucdata/ucdata.c b/libraries/liblunicode/ucdata/ucdata.c index 5e34a31cf1..01a94a0294 100644 --- a/libraries/liblunicode/ucdata/ucdata.c +++ b/libraries/liblunicode/ucdata/ucdata.c @@ -36,6 +36,12 @@ #include "ucdata.h" +#ifdef WIN32 +#define UC_DIRSEP '\\' +#else +#define UC_DIRSEP '/' +#endif + /************************************************************************** * * Miscellaneous types, data, and support functions. @@ -83,7 +89,7 @@ _ucopenfile(char *paths, char *filename, char *mode) pp = path; while (*dp && *dp != ':') *pp++ = *dp++; - *pp++ = '/'; + *pp++ = UC_DIRSEP; fp = filename; while (*fp) @@ -223,6 +229,9 @@ _ucprop_lookup(unsigned long code, unsigned long n) { long l, r, m; + if (_ucprop_size == 0) + return 0; + /* * There is an extra node on the end of the offsets to allow this routine * to work right. If the index is 0xffff, then there are no nodes for the -- 2.39.5