Commit b100339e authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

Flush file in fputc when character is '\n'.

parent 36aee719
......@@ -2220,11 +2220,17 @@ int MSVCRT__flsbuf(int c, MSVCRT_FILE* file);
int MSVCRT_fputc(int c, MSVCRT_FILE* file)
{
if(file->_cnt>0) {
*file->_ptr++=c;
file->_cnt--;
return c;
*file->_ptr++=c;
file->_cnt--;
if (c == '\n')
{
int res = msvcrt_flush_buffer(file);
return res ? res : c;
}
else
return c;
} else {
return MSVCRT__flsbuf(c, file);
return MSVCRT__flsbuf(c, file);
}
}
......
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