ref: b76a78c1a1973d62ff32c030e29b3ffcc560e50d
parent: 66ab4ac223a51a51ac431b60481183bc44c70215
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Feb 24 23:36:37 EST 2019
cwfs: fix %.*s format in cmd_printconf()
--- a/sys/src/cmd/cwfs/config.c
+++ b/sys/src/cmd/cwfs/config.c
@@ -529,11 +529,11 @@
if(*p++ != '\n')
continue;
if (strncmp(s, "ip", 2) != 0) /* don't print obsolete cmds */
- print("%.*s", (int)(p-s), s);
+ print("%.*s", utfnlen(s, p-s), s);
s = p;
}
if(p != s)
- print("%.*s", (int)(p-s), s);
+ print("%.*s", utfnlen(s, p-s), s);
print("end\n");
putbuf(iob);