msvcrt: Clear end-of-file flag on fseek.

This commit is contained in:
Erik de Castro Lopo 2008-04-08 21:53:53 +10:00 committed by Alexandre Julliard
parent 994af69cac
commit 60501aa93e
2 changed files with 3 additions and 1 deletions

View File

@ -918,6 +918,8 @@ int CDECL MSVCRT_fseek(MSVCRT_FILE* file, long offset, int whence)
if(file->_flag & MSVCRT__IORW) {
file->_flag &= ~(MSVCRT__IOREAD|MSVCRT__IOWRT);
}
/* Clear end of file flag */
file->_flag &= ~MSVCRT__IOEOF;
return (_lseek(file->_file,offset,whence) == -1)?-1:0;
}

View File

@ -241,7 +241,7 @@ static void test_readmode( BOOL ascii_mode )
ok(fread(buffer,1,1,file)==0,"fread failure in %s\n", IOMODE);
ok(feof(file)!=0,"feof failure in %s\n", IOMODE);
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(feof(file)==0,"feof failure in %s\n", IOMODE);
ok(fread(buffer,2,1,file)==1,"fread failed 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);