From 94e9f9d1e19e305c5f87038c878c15f40be568e2 Mon Sep 17 00:00:00 2001 From: FBEZ Date: Fri, 20 Jun 2025 11:08:02 +0200 Subject: [PATCH] added unsigned char casting for errors in esp-idf building system --- tinyexpr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tinyexpr.c b/tinyexpr.c index 176e8d0..607c37e 100755 --- a/tinyexpr.c +++ b/tinyexpr.c @@ -252,10 +252,10 @@ void next_token(state *s) { s->type = TOK_NUMBER; } else { /* Look for a variable or builtin function call. */ - if (isalpha(s->next[0])) { + if (isalpha((unsigned char)s->next[0])) { const char *start; start = s->next; - while (isalpha(s->next[0]) || isdigit(s->next[0]) || (s->next[0] == '_')) s->next++; + while (isalpha((unsigned char)s->next[0]) || isdigit((unsigned char)s->next[0]) || (s->next[0] == '_')) s->next++; const te_variable *var = find_lookup(s, start, s->next - start); if (!var) var = find_builtin(start, s->next - start);