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:
parent
56de92d795
commit
19a088202a
|
@ -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;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
|
|
Loading…
Reference in New Issue