mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Fixed ftell for streams which are opened for reading and writing.
svn path=/trunk/; revision=3038
This commit is contained in:
parent
f0cb69cade
commit
9ac5422074
1 changed files with 4 additions and 4 deletions
|
@ -22,15 +22,15 @@ long ftell(FILE *f)
|
|||
|
||||
if (f->_cnt < 0)
|
||||
f->_cnt = 0;
|
||||
else if (f->_flag&_IOREAD)
|
||||
{
|
||||
adjust = - f->_cnt;
|
||||
}
|
||||
else if (f->_flag&(_IOWRT))
|
||||
{
|
||||
if (f->_base && (f->_flag&_IONBF)==0)
|
||||
adjust = f->_ptr - f->_base;
|
||||
}
|
||||
else if (f->_flag&_IOREAD)
|
||||
{
|
||||
adjust = - f->_cnt;
|
||||
}
|
||||
else
|
||||
return -1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue