msvcrt: Fix fflush() of files opened for read.

Some apps, for no particular reason, call fflush() on files opened for
read.  This keeps them from tripping over their shoelaces.
This commit is contained in:
Alexandre Julliard 2006-03-24 16:53:12 +00:00
parent 56de92d795
commit 19a088202a

View File

@ -588,11 +588,11 @@ int MSVCRT_fflush(MSVCRT_FILE* file)
{
if(!file) {
_flushall();
return 0;
} else {
} else if(file->_flag & MSVCRT__IOWRT) {
int res=msvcrt_flush_buffer(file);
return res;
}
return 0;
}
/*********************************************************************