msvcrt: fclose patch

François Gouget fgouget at codeweavers.com
Wed May 30 21:52:59 CDT 2001


Changelog:

 * dlls/msvcrt/file.c

   fclose should return EOF (-1) if an error condition exists

-- 
François Gouget
fgouget at codeweavers.com
-------------- next part --------------
Index: dlls/msvcrt/file.c
===================================================================
RCS file: /home/wine/wine/dlls/msvcrt/file.c,v
retrieving revision 1.6
diff -u -r1.6 file.c
--- dlls/msvcrt/file.c	2001/05/09 17:31:32	1.6
+++ dlls/msvcrt/file.c	2001/05/30 17:20:54
@@ -1195,7 +1201,9 @@
  */
 int MSVCRT_fclose(MSVCRT_FILE* file)
 {
-  return _close(file->_file);
+  int r;
+  r=_close(file->_file);
+  return ((r==MSVCRT_EOF) || (file->_flag & _IOERR) ? MSVCRT_EOF : 0);
 }
 
 /*********************************************************************


More information about the wine-patches mailing list