From: Piotr Caban piotr@codeweavers.com
--- dlls/msvcrt/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 22888d88a8a..bb1b0792ebe 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -2407,8 +2407,9 @@ int CDECL _wsopen_dispatch( const wchar_t* path, int oflags, int shflags, int pm debugstr_w(path), oflags, shflags, pmode, fd, secure);
if (!MSVCRT_CHECK_PMT( fd != NULL )) return EINVAL; - *fd = -1; + if (!MSVCRT_CHECK_PMT(path != NULL)) return EINVAL; + wxflag = split_oflags(oflags); switch (oflags & (_O_RDONLY | _O_WRONLY | _O_RDWR)) {