From: Adam Dickmeiss Date: Mon, 25 Jul 2011 10:55:02 +0000 (+0200) Subject: yaz_is_abspath: drive letter test NOT using isalpha X-Git-Tag: v4.2.6~10 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=cf6bf2f04ed7e376bfd9a37f7ef4ab0366f46804 yaz_is_abspath: drive letter test NOT using isalpha isalpha is problematic for signed chars and we assume drive letters are [a-zA-Z] only; also isalpha depends locale. --- diff --git a/src/tpath.c b/src/tpath.c index 900552e..b802c98 100644 --- a/src/tpath.c +++ b/src/tpath.c @@ -129,7 +129,8 @@ int yaz_is_abspath(const char *p) #ifdef WIN32 if (*p == '\\') return 1; - if (*p && p[1] == ':' && isalpha(*p)) + if (*p && p[1] == ':' && + ((*p >= 'A' && *p <= 'Z') || (*p >= 'a' && *p <= 'z'))) return 1; #endif return 0;