Fix fopen(filename, "w") not creating files.

This commit is contained in:
Jonas 'Sortie' Termansen 2013-01-08 15:07:38 +01:00
parent df67725221
commit 3a35139e6c
1 changed files with 1 additions and 2 deletions

View File

@ -185,9 +185,8 @@ FILE* fopen(const char* path, const char* mode)
{
case 'r': omode = O_RDONLY; break;
case 'a': oflags |= O_APPEND; /* fall-through */
case 'w': omode = O_WRONLY; break;
case 'w': omode = O_WRONLY; oflags |= O_CREAT | O_TRUNC; break;
case '+':
if ( omode == O_WRONLY ) { oflags |= O_CREAT | O_TRUNC; }
omode = O_RDWR;
break;
case 'b': break;