From de163fe7ee64e63d36dd581db16c776831cbead0 Mon Sep 17 00:00:00 2001 From: Mosder Date: Thu, 17 Sep 2026 12:37:01 +0200 Subject: feat: improved compatibility - removed possible duplicate names, exit tests now create a fork instead of relying on being able to overwrite exit function, made tester only output ASCII escape sequences for colour into a tty --- src/string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/string.c') diff --git a/src/string.c b/src/string.c index 6625d8f..606a80c 100644 --- a/src/string.c +++ b/src/string.c @@ -45,7 +45,7 @@ MosStringSlice mos_ss_trim(MosStringSlice ss) { MosStringSlice mos_ss_trim_left(MosStringSlice ss) { size_t i = 0; - while (i < ss.len && isspace(ss.data[i])) { + while (i < ss.len && isspace((unsigned char)ss.data[i])) { i++; } @@ -56,7 +56,7 @@ MosStringSlice mos_ss_trim_left(MosStringSlice ss) { MosStringSlice mos_ss_trim_right(MosStringSlice ss) { size_t i = ss.len; - while (i-- > 0 && isspace(ss.data[i])) + while (i-- > 0 && isspace((unsigned char)ss.data[i])) ; ss.len = i + 1; -- cgit v1.2.3