Module: wine Branch: master Commit: 9ae995f674b55bacadee9068ebad376e3574a0fa URL: http://source.winehq.org/git/wine.git/?a=commit;h=9ae995f674b55bacadee9068eb...
Author: Markus Amsler markus.amsler@oribi.org Date: Fri Oct 13 00:03:56 2006 +0200
msvcrt: Fix fread eof handling.
---
dlls/msvcrt/file.c | 1 + dlls/msvcrt/tests/file.c | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 6314210..98c800c 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -2538,6 +2538,7 @@ MSVCRT_size_t CDECL MSVCRT_fread(void *p /* If the buffer fill reaches eof but fread wouldn't, clear eof. */ if (i > 0 && i < file->_cnt) { MSVCRT_fdesc[file->_file].wxflag &= ~WX_ATEOF; + file->_flag &= ~MSVCRT__IOEOF; } if (i > 0) { memcpy(ptr, file->_ptr, i); diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c index 00bd253..d269765 100644 --- a/dlls/msvcrt/tests/file.c +++ b/dlls/msvcrt/tests/file.c @@ -228,7 +228,7 @@ static void test_readmode( BOOL ascii_mo ok(fseek(file,-3,SEEK_CUR)==0,"seek failure in %s\n", IOMODE); todo_wine ok(feof(file)==0,"feof failure in %s\n", IOMODE); ok(fread(buffer,2,1,file)==1,"fread failed in %s\n", IOMODE); - todo_wine ok(feof(file)==0,"feof failure in %s\n", IOMODE); + ok(feof(file)==0,"feof failure in %s\n", IOMODE); ok(fread(buffer,2,1,file)==0,"fread failure in %s\n",IOMODE); ok(feof(file)!=0,"feof failure in %s\n", IOMODE);