Commit fb54c4e0 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp60: Use 'MultiByteToWideChar' in __Fiopen implementation.

Based on a patch by Yeshun Ye.
parent dc1fa72d
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "msvcp.h" #include "msvcp.h"
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "windows.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(msvcp); WINE_DEFAULT_DEBUG_CHANNEL(msvcp);
...@@ -2128,7 +2129,7 @@ FILE* __cdecl ___Fiopen(const char *name, int mode) ...@@ -2128,7 +2129,7 @@ FILE* __cdecl ___Fiopen(const char *name, int mode)
TRACE("(%p %d)\n", name, mode); TRACE("(%p %d)\n", name, mode);
if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0) if(!MultiByteToWideChar(CP_ACP, 0, name, -1, nameW, FILENAME_MAX-1))
return NULL; return NULL;
return _Fiopen_wchar(nameW, mode, _SH_DENYNO); return _Fiopen_wchar(nameW, mode, _SH_DENYNO);
} }
......
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