- Fixed a bug which results in losing a character in the write buffer

if there is a  call to lseek immediately after the call to flsbuf.

svn path=/trunk/; revision=13065
This commit is contained in:
Hartmut Birr 2005-01-15 20:20:53 +00:00
parent 9dab4509fa
commit 9bf671b7f6

View file

@ -93,6 +93,7 @@ int _flsbuf(int c, FILE* f)
if ((f->_flag & (_IO_LBF|_IONBF)) == 0) { if ((f->_flag & (_IO_LBF|_IONBF)) == 0) {
f->_cnt--; f->_cnt--;
*f->_ptr++ = c; *f->_ptr++ = c;
f->_flag |= _IODIRTY;
} }
return c; return c;
} }