msvcrt: Fix fread eof handling.
This commit is contained in:
parent
fdd61a7a35
commit
9ae995f674
|
@ -2538,6 +2538,7 @@ MSVCRT_size_t CDECL MSVCRT_fread(void *ptr, MSVCRT_size_t size, MSVCRT_size_t nm
|
|||
/* 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);
|
||||
|
|
|
@ -228,7 +228,7 @@ static void test_readmode( BOOL ascii_mode )
|
|||
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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue