Commit 9924f009 authored by Lauri Kenttä's avatar Lauri Kenttä Committed by Alexandre Julliard

msvcrt: Fix _creat and _wcreat.

parent d639d3bb
...@@ -2430,19 +2430,19 @@ int CDECL MSVCRT__wopen(const MSVCRT_wchar_t *path,int flags,...) ...@@ -2430,19 +2430,19 @@ int CDECL MSVCRT__wopen(const MSVCRT_wchar_t *path,int flags,...)
/********************************************************************* /*********************************************************************
* _creat (MSVCRT.@) * _creat (MSVCRT.@)
*/ */
int CDECL MSVCRT__creat(const char *path, int flags) int CDECL MSVCRT__creat(const char *path, int pmode)
{ {
int usedFlags = (flags & MSVCRT__O_TEXT)| MSVCRT__O_CREAT| MSVCRT__O_WRONLY| MSVCRT__O_TRUNC; int flags = MSVCRT__O_CREAT | MSVCRT__O_TRUNC | MSVCRT__O_RDWR;
return MSVCRT__open(path, usedFlags); return MSVCRT__open(path, flags, pmode);
} }
/********************************************************************* /*********************************************************************
* _wcreat (MSVCRT.@) * _wcreat (MSVCRT.@)
*/ */
int CDECL MSVCRT__wcreat(const MSVCRT_wchar_t *path, int flags) int CDECL MSVCRT__wcreat(const MSVCRT_wchar_t *path, int pmode)
{ {
int usedFlags = (flags & MSVCRT__O_TEXT)| MSVCRT__O_CREAT| MSVCRT__O_WRONLY| MSVCRT__O_TRUNC; int flags = MSVCRT__O_CREAT | MSVCRT__O_TRUNC | MSVCRT__O_RDWR;
return MSVCRT__wopen(path, usedFlags); return MSVCRT__wopen(path, flags, pmode);
} }
/********************************************************************* /*********************************************************************
......
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