ref: 2e5cd278d75be0cc046ac66259cc8d20af04b0c8
parent: 536805bce3fb88d94fbb90e2d9e23fcef1287095
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Feb 24 22:34:25 EST 2019
upas/ned: fix %.*s format in parsesearch(), improve mkfile
--- a/sys/src/cmd/upas/ned/mkfile
+++ b/sys/src/cmd/upas/ned/mkfile
@@ -1,5 +1,4 @@
</$objtype/mkfile
-<../mkupas
TARG=nedmail
@@ -17,3 +16,4 @@
</sys/src/cmd/mkone
CFLAGS=$CFLAGS -I../common
+<../mkupas
--- a/sys/src/cmd/upas/ned/nedmail.c
+++ b/sys/src/cmd/upas/ned/nedmail.c
@@ -1074,7 +1074,7 @@
np = qstrchr(p, c);
if(c == '#' && np)
if(e = qstrchr(np + 1, c)){
- snprint(buf, bufl, "%.*s", (int)(np - p), p);
+ snprint(buf, bufl, "%.*s", utfnlen(p, np - p), p);
p = np + 1;
np = e;
}