From 5e85eb7d8ef37c0a6f5913816337eadc59d3083d Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Thu, 2 Aug 2001 07:26:30 +0000 Subject: [PATCH] Fixed a minor bug in _filbuf(). When there was returned a character from stream, the counter wasn't decremented. svn path=/trunk/; revision=2134 --- reactos/lib/crtdll/stdio/filbuf.c | 1 + reactos/lib/msvcrt/stdio/filbuf.c | 1 + 2 files changed, 2 insertions(+) diff --git a/reactos/lib/crtdll/stdio/filbuf.c b/reactos/lib/crtdll/stdio/filbuf.c index 2bab0044ae0..b9b008affe1 100644 --- a/reactos/lib/crtdll/stdio/filbuf.c +++ b/reactos/lib/crtdll/stdio/filbuf.c @@ -98,6 +98,7 @@ _filbuf(FILE *f) return EOF; } + f->_cnt--; return *f->_ptr++ & 0377; } diff --git a/reactos/lib/msvcrt/stdio/filbuf.c b/reactos/lib/msvcrt/stdio/filbuf.c index 955df6242ce..b98f48b0749 100644 --- a/reactos/lib/msvcrt/stdio/filbuf.c +++ b/reactos/lib/msvcrt/stdio/filbuf.c @@ -98,6 +98,7 @@ _filbuf(FILE *f) return EOF; } + f->_cnt--; return *f->_ptr++ & 0377; }