Commit b6dc0940 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

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

parent 30a3d18a
......@@ -1195,7 +1195,9 @@ void MSVCRT_clearerr(MSVCRT_FILE* file)
*/
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);
}
/*********************************************************************
......
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