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

This commit is contained in:
cinap_lenrek 2019-02-25 04:20:00 +01:00
parent b4b4d2286b
commit 980d64826e

View file

@ -1463,7 +1463,7 @@ special(char *s, Dev *d, Req *r)
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));