From 991b8b01d6098bf16b9f490a7f84c4aabf02d3b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigrid=20Solveig=20Hafl=C3=ADnud=C3=B3ttir?= Date: Mon, 3 May 2021 18:59:47 +0000 Subject: [PATCH] fix string trimming on non-latin chars --- tags.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tags.c b/tags.c index 9c21a33..684fd26 100644 --- a/tags.c +++ b/tags.c @@ -41,10 +41,10 @@ tagscallcb(Tagctx *ctx, int type, const char *k, char *s, int offset, int size, char *e; if(f == nil && size == 0){ - while(*s <= ' ' && *s) + while((uchar)*s <= ' ' && *s) s++; e = s + strlen(s); - while(e != s && e[-1] <= ' ') + while(e != s && (uchar)e[-1] <= ' ') e--; *e = 0; } -- 2.45.2