From 9caf6157a59082804c240d209cf85a6a40f777a3 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku <kaz@kylheku.com> Date: Tue, 2 Jan 2024 14:47:30 -0800 Subject: isdrive: fix misuse of isalpha. * 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. --- winsup/cygwin/path.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3