git: 9front

Download patch

ref: 641c1d29e085facb97071f64ff8a5953decbf82b
parent: 2a3e8eba4a6eda280d52ddb256c13a0eb33b0f45
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Feb 24 23:20:43 EST 2019

abaco: fix %.*s format in findctype()

--- a/sys/src/cmd/abaco/util.c
+++ b/sys/src/cmd/abaco/util.c
@@ -747,7 +747,7 @@
 		for(e = p; *e < 127 && *e > ' ' ; e++)
 			;
 	}
-	i = e-p;
+	i = utfnlen(p, e - p);
 	if(i < 1)
 		return -1;
 	snprint(b, l, "%.*s", i, p);
--