aboutsummaryrefslogtreecommitdiff
path: root/src/string.c
diff options
context:
space:
mode:
authorMosder <git@mosder.eu>2026-09-17 12:37:01 +0200
committerMosder <git@mosder.eu>2026-09-17 12:37:11 +0200
commitde163fe7ee64e63d36dd581db16c776831cbead0 (patch)
tree57f9861bd63a5479c8ee1d829a00d3b4ab053bba /src/string.c
parent33e2e9d8aff7ee16aa5c071df93d6f9c0a37e53f (diff)
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
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c4
1 files changed, 2 insertions, 2 deletions
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;