summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2019-02-25 03:34:25 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2019-02-25 03:34:25 +0100
commit2e5cd278d75be0cc046ac66259cc8d20af04b0c8 (patch)
tree2d4896e945f409c13fb68f07f8298e6c7787c934
parent536805bce3fb88d94fbb90e2d9e23fcef1287095 (diff)
upas/ned: fix %.*s format in parsesearch(), improve mkfile
-rw-r--r--sys/src/cmd/upas/ned/mkfile2
-rw-r--r--sys/src/cmd/upas/ned/nedmail.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/cmd/upas/ned/mkfile b/sys/src/cmd/upas/ned/mkfile
index e5b8df406..9df4a2adf 100644
--- 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 @@ UPDATE=\
</sys/src/cmd/mkone
CFLAGS=$CFLAGS -I../common
+<../mkupas
diff --git a/sys/src/cmd/upas/ned/nedmail.c b/sys/src/cmd/upas/ned/nedmail.c
index d73d80dd5..81ebcd271 100644
--- a/sys/src/cmd/upas/ned/nedmail.c
+++ b/sys/src/cmd/upas/ned/nedmail.c
@@ -1074,7 +1074,7 @@ parsesearch(char **pp, char *buf, int bufl)
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;
}