git: 9front

Download patch

ref: 2a3e8eba4a6eda280d52ddb256c13a0eb33b0f45
parent: 4afb4720be9c5290584eadf1bbd0614d73814e06
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Feb 24 23:20:00 EST 2019

atazz: fix %.*s format in special command processing

--- a/sys/src/cmd/atazz/main.c
+++ b/sys/src/cmd/atazz/main.c
@@ -1463,7 +1463,7 @@
 	for(t = s; *t == '<' || *t == '>'; t++)
 		;
 	if(t != s)
-		snprint(sbuf, sizeof buf, "%.*s %s", (int)(t - s), s, t);
+		snprint(sbuf, sizeof buf, "%.*s %s", utfnlen(s, t - s), s, t);
 	else
 		snprint(sbuf, sizeof sbuf, "%s", s);
 	nf = tokenize(sbuf, f, nelem(f));
--