bug fix
This commit is contained in:
parent
e60f0f3981
commit
17a2c4977e
1 changed files with 5 additions and 5 deletions
|
@ -14,8 +14,8 @@ _flushbuf(c, iop)
|
||||||
else {
|
else {
|
||||||
extern unsigned char _sobuf[];
|
extern unsigned char _sobuf[];
|
||||||
|
|
||||||
iop->_buf = iop->_ptr = _sobuf;
|
iop->_buf = _sobuf;
|
||||||
iop->_count = BUFSIZ;
|
iop->_count = BUFSIZ-1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -25,11 +25,11 @@ _flushbuf(c, iop)
|
||||||
iop->_flags |= IO_UNBUFF;
|
iop->_flags |= IO_UNBUFF;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
iop->_ptr = iop->_buf;
|
|
||||||
iop->_flags |= IO_MYBUF;
|
iop->_flags |= IO_MYBUF;
|
||||||
iop->_count = BUFSIZ;
|
iop->_count = BUFSIZ-1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
iop->_ptr = iop->_buf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ _flushbuf(c, iop)
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
int count = BUFSIZ - iop->_count;
|
int count = iop->_ptr - iop->_buf;
|
||||||
|
|
||||||
iop->_count = BUFSIZ - 1;
|
iop->_count = BUFSIZ - 1;
|
||||||
iop->_ptr = iop->_buf + 1;
|
iop->_ptr = iop->_buf + 1;
|
||||||
|
|
Loading…
Reference in a new issue