~ft/libtags

991b8b01d6098bf16b9f490a7f84c4aabf02d3b7 — Sigrid Solveig Haflínudóttir 2 years ago 55726cd
fix string trimming on non-latin chars
1 files changed, 2 insertions(+), 2 deletions(-)

M tags.c
M tags.c => tags.c +2 -2
@@ 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;
	}