Commit ab09750b authored by rswindell's avatar rswindell
Browse files

Added fix-up for improper use of fnopen (O_CREAT|O_WRONLY).

parent 30ac4be2
......@@ -70,6 +70,10 @@ FILE* DLLCALL fnopen(int *fd, char *str, int access)
int file;
FILE * stream;
if(access&O_CREAT && access&O_WRONLY) { /* not compatible with fdopen */
access&=~O_WRONLY;
access|=O_RDWR;
}
if((file=nopen(str,access))==-1)
return(NULL);
......
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