Avoid ctype.h abuse: cast char to unsigned char first.

fix #3151
This commit is contained in:
riastradh authored and GitHub committed 2024-07-11 23:17:06 +02:00
1 parent e2ffb5360a
commit 2ee20ca604
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -126,7 +126,7 @@ static void die() {
}
static int isoptish(const char* text) {
return text[0] == '-' && (text[1] == '-' || isalpha(text[1]));
return text[0] == '-' && (text[1] == '-' || isalpha((unsigned char)text[1]));
}
static int isoption(const char* text, char shortopt, const char* longopt, size_t *short_opts) {