summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-01-02 14:47:30 -0800
committerKaz Kylheku <kaz@kylheku.com>2024-01-02 14:47:30 -0800
commit9caf6157a59082804c240d209cf85a6a40f777a3 (patch)
treeb964ad9f04f200a328700529a528c7a5399a8d72
parent66019dbead11137ab3184dc0837f7c7ef92245b7 (diff)
downloadcygnal-release-3.2.0.tar.gz
cygnal-release-3.2.0.tar.bz2
cygnal-release-3.2.0.zip
isdrive: fix misuse of isalpha.cygnal-release-3.2.0cygnal-3-1-98-branch
* winsup/cygwin/path.h (isdrive): This macro is called with a char argument, which it passes to isalpha. It needs to be cast to unsigned char.
-rw-r--r--winsup/cygwin/path.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h
index c1cdc554b..f3dffe719 100644
--- a/winsup/cygwin/path.h
+++ b/winsup/cygwin/path.h
@@ -438,7 +438,7 @@ const char *__reg3 find_exec (const char *name, path_conv& buf,
const char **known_suffix = NULL);
/* Common macros for checking for invalid path names */
-#define isdrive(s) (isalpha (*(s)) && (s)[1] == ':')
+#define isdrive(s) (isalpha ((unsigned char) *(s)) && (s)[1] == ':')
#define iswdrive(s) (iswalpha (*(s)) && (s)[1] == L':')
static inline bool