diff options
context:
space:
mode:
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Cast signed chars before ctype calls
A plain char is undefined in the ctype functions for negative values, which a high byte produces wherever char is signed.
Diffstat (limited to 'source/ui-log.c')
-rw-r--r--source/ui-log.c4
1 file changed, 2 insertions, 2 deletions
diff --git a/source/ui-log.c b/source/ui-log.c
index 9906bbc..d3610d3 100644
--- a/source/ui-log.c
+++ b/source/ui-log.c
@@ -350,13 +350,13 @@ static char *next_token(char **src)
if (!src || !*src)
return NULL;
- while (isspace(**src))
+ while (isspace((unsigned char)**src))
(*src)++;
if (!**src)
return NULL;
result = *src;
while (**src) {
- if (isspace(**src)) {
+ if (isspace((unsigned char)**src)) {
**src = '\0';
(*src)++;
break;