ref: 980d64826e1d64c992313ae3f020298dd3dcfe37
parent: b4b4d2286bc0e7a4906bd00931b54b5d96099887
author: cinap_lenrek <[email protected]>
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));