yet another fix in freopen: re-opening for reading did not work properly
This commit is contained in:
parent
a1ae336247
commit
c93f6d9fb1
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ register FILE *fp;
|
|||
return NULL;
|
||||
}
|
||||
fp->_count = 0;
|
||||
if (fp->_buf) fp->_count = BUFSIZ;
|
||||
if (fp->_buf && (flags | IO_WRITEMODE)) fp->_count = BUFSIZ;
|
||||
fp->_fd = fd;
|
||||
fp->_flags = flags;
|
||||
return(fp);
|
||||
|
|
Loading…
Reference in a new issue