Module: wine Branch: refs/heads/master Commit: 19a088202a21bbc9d77103d3ee5f696d6a08defc URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=19a088202a21bbc9d77103d3...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Mar 24 16:53:12 2006 +0000
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.
---
dlls/msvcrt/file.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 9162ee7..0a99cce 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -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; }
/*********************************************************************