From bbafda6e8629d8513697021aa1d06e786084af54 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Thu, 8 Apr 2021 21:32:31 +0200 Subject: regex: Avoid wrong assumption that char is always signed. --- src/regex.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/regex.cpp b/src/regex.cpp index ae5476e..2a39f63 100644 --- a/src/regex.cpp +++ b/src/regex.cpp @@ -37,7 +37,7 @@ static inline bool isspace(char c) static inline bool isalpha(char c) { - return c<0 || (c>='a' && c<='z') || (c>='A' && c<='Z'); + return static_cast(c)>=128 || (c>='a' && c<='z') || (c>='A' && c<='Z'); } static inline bool isdigit(char c) -- cgit v0.12