aboutsummaryrefslogtreecommitdiff
path: root/src/lib9/fmt/fmtquote.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-05-26 00:53:07 +0000
committerrsc <devnull@localhost>2006-05-26 00:53:07 +0000
commitab239cb5ba1e3e72d53a55ca2a2e97469c29e884 (patch)
tree688432115f6e76cbf2d03fc7dee59bc5a0b35680 /src/lib9/fmt/fmtquote.c
parentf3b8bf7f4ee326d9de31947584c6e9dbbfa75ce6 (diff)
downloadplan9port-ab239cb5ba1e3e72d53a55ca2a2e97469c29e884.tar.gz
plan9port-ab239cb5ba1e3e72d53a55ca2a2e97469c29e884.tar.bz2
plan9port-ab239cb5ba1e3e72d53a55ca2a2e97469c29e884.zip
oops
Diffstat (limited to 'src/lib9/fmt/fmtquote.c')
-rw-r--r--src/lib9/fmt/fmtquote.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib9/fmt/fmtquote.c b/src/lib9/fmt/fmtquote.c
index 5b8f9fd4..8c8daaee 100644
--- a/src/lib9/fmt/fmtquote.c
+++ b/src/lib9/fmt/fmtquote.c
@@ -91,6 +91,11 @@ __quotesetup(char *s, Rune *r, int nin, int nout, Quoteinfo *q, int sharp, int r
/* advance output */
q->nbytesout += w;
q->nrunesout++;
+
+#ifndef PLAN9PORT
+ /* ANSI requires precision in bytes, not Runes. */
+ nin-= w-1; /* and then n-- in the loop */
+#endif
}
}