diff --git a/src/lib9/fmt/dofmt.c b/src/lib9/fmt/dofmt.c index e4e32bf4..214b71db 100644 --- a/src/lib9/fmt/dofmt.c +++ b/src/lib9/fmt/dofmt.c @@ -246,13 +246,13 @@ int fmtstrcpy(Fmt *f, char *s) { int i, j; - Rune r; if(!s) return __fmtcpy(f, "", 5, 5); /* if precision is specified, make sure we don't wander off the end */ if(f->flags & FmtPrec){ #ifdef PLAN9PORT + Rune r; i = 0; for(j=0; jprec && s[i]; j++) i += chartorune(&r, s+i);