From: Hartmut Birr Date: Mon, 1 Apr 2002 22:00:02 +0000 (+0000) Subject: Fixed error handling in _filebuf(). X-Git-Tag: backups/mpw@12443~138 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=2cda2c03b32b2492d6f5f6e4725fb6e13db64ea6 Fixed error handling in _filebuf(). svn path=/trunk/; revision=2804 --- diff --git a/reactos/lib/msvcrt/stdio/filbuf.c b/reactos/lib/msvcrt/stdio/filbuf.c index b98f48b0749..5033a60a26c 100644 --- a/reactos/lib/msvcrt/stdio/filbuf.c +++ b/reactos/lib/msvcrt/stdio/filbuf.c @@ -86,8 +86,8 @@ _filbuf(FILE *f) //check for error - if (--f->_cnt < 0) { - if (f->_cnt == -1) { + if (f->_cnt <= 0) { + if (f->_cnt == 0) { f->_flag |= _IOEOF; } else f->_flag |= _IOERR;