diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2001-10-24 18:10:30 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2001-10-24 18:10:30 +0000 |
commit | d0504c353f6fe828817404eaad21bc4af114fc54 (patch) | |
tree | 49c005956f662e15fe0b324ae5e125b4390319b6 /newlib/libc/stdio | |
parent | a83037821314fead515198f88a9b83e29e66ca2f (diff) | |
download | newlib-d0504c353f6fe828817404eaad21bc4af114fc54.zip newlib-d0504c353f6fe828817404eaad21bc4af114fc54.tar.gz newlib-d0504c353f6fe828817404eaad21bc4af114fc54.tar.bz2 |
2001-10-24 Christopher Faylor <cgf@redhat.com>
* libc/stdio/fseek.c: Reset pointer to buffer base
when forced to seek outside of current buffer contents.
This prevents the code from erroneously thinking there is
anything in the current buffer.
Diffstat (limited to 'newlib/libc/stdio')
-rw-r--r-- | newlib/libc/stdio/fseek.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/newlib/libc/stdio/fseek.c b/newlib/libc/stdio/fseek.c index d22292e..1b72989 100644 --- a/newlib/libc/stdio/fseek.c +++ b/newlib/libc/stdio/fseek.c @@ -278,6 +278,7 @@ fseek (fp, offset, whence) if ((*seekfn) (fp->_cookie, curoff, SEEK_SET) == POS_ERR) goto dumb; fp->_r = 0; + fp->_p = fp->_bf._base; if (HASUB (fp)) FREEUB (fp); fp->_flags &= ~__SEOF; |