Commit 60501aa9 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo Committed by Alexandre Julliard

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

parent 994af69c
......@@ -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;
}
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment