msvcrt: Reset write direction after flush on read/write stream.

This commit is contained in:
Piotr Caban 2015-01-23 17:27:29 +01:00 committed by Alexandre Julliard
parent 7880525f44
commit 90b68f9964
1 changed files with 4 additions and 0 deletions

View File

@ -613,6 +613,9 @@ static int msvcrt_flush_buffer(MSVCRT_FILE* file)
file->_flag |= MSVCRT__IOERR;
return MSVCRT_EOF;
}
if(file->_flag & MSVCRT__IORW)
file->_flag &= ~MSVCRT__IOWRT;
}
file->_ptr=file->_base;
@ -3797,6 +3800,7 @@ int CDECL MSVCRT__flsbuf(int c, MSVCRT_FILE* file)
res = msvcrt_flush_buffer(file);
if(res)
return res;
file->_flag |= MSVCRT__IOWRT;
file->_cnt=file->_bufsiz;
}
*file->_ptr++ = c;