do flush properly

This commit is contained in:
rsc 2004-04-25 21:13:58 +00:00
parent e5f0d957f2
commit 62780722f5
2 changed files with 7 additions and 1 deletions

View file

@ -31,7 +31,11 @@ Bfmtinit(Fmt *f, Biobuf *b)
int
Bfmtflush(Fmt *f)
{
if(_Bfmtflush(f) <= 0)
Biobuf *b;
b = f->farg;
if(f->to == nil)
return -1;
b->ocount = (char*)f->to - (char*)f->stop;
return f->nfmt;
}