MSVCRT_fread: expose feof flag.

oldstable
Uwe Bonnes 2002-07-08 20:44:09 +00:00 committed by Alexandre Julliard
parent 38855a952b
commit 05ccdea0fa
1 changed files with 5 additions and 0 deletions

View File

@ -1788,6 +1788,11 @@ MSVCRT_size_t MSVCRT_fread(void *ptr, MSVCRT_size_t size, MSVCRT_size_t nmemb, M
return 0;
}
if(rcnt) pread = _read(file->_file,ptr, rcnt);
if (MSVCRT_flags[file->_file] & MSVCRT__IOEOF)
/* expose feof condition in the flags
MFC tests file->_flag for feof, and doesn't not call feof())
*/
file->_flag |= MSVCRT__IOEOF;
if (pread <= 0)
pread = 0;
read+=pread;