From cf6bf2f04ed7e376bfd9a37f7ef4ab0366f46804 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 25 Jul 2011 12:55:02 +0200 Subject: [PATCH] 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. --- src/tpath.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 1.7.10.4