nusb/audio: fix %.*s format usage

front
cinap_lenrek 2019-02-25 03:41:10 +01:00
parent 5ec91a6413
commit a37402be19
1 changed files with 2 additions and 1 deletions

View File

@ -122,7 +122,8 @@ fswrite(Req *r)
char msg[256], *f[4];
int nf, speed;
snprint(msg, sizeof(msg), "%.*s", r->ifcall.count, r->ifcall.data);
snprint(msg, sizeof(msg), "%.*s",
utfnlen((char*)r->ifcall.data, r->ifcall.count), (char*)r->ifcall.data);
nf = tokenize(msg, f, nelem(f));
if(nf < 2){
respond(r, "invalid ctl message");