From 3aa7b7b46438dcb7bf074e1dc7a9ec4924df3de7 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Wed, 15 Jul 2026 13:20:41 -1000 Subject: 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. --- source/ui-log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/ui-log.c') 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; -- cgit v2.8.0