shithub: libtags

Download patch

ref: 991b8b01d6098bf16b9f490a7f84c4aabf02d3b7
parent: 55726cd44bdf8ab361ba4caee05107ab6f4ea430
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Mon May 3 14:59:47 EDT 2021

fix string trimming on non-latin chars

--- a/tags.c
+++ b/tags.c
@@ -41,10 +41,10 @@
 	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;
 	}