From ab239cb5ba1e3e72d53a55ca2a2e97469c29e884 Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 26 May 2006 00:53:07 +0000 Subject: oops --- src/lib9/fmt/fmtquote.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/lib9/fmt/fmtquote.c') 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 } } -- cgit v1.2.3