Commit 8c46e2a8 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp90: Use 'MultiByteToWideChar' in _Fiopen implementation.

Based on a patch by Yeshun Ye.
parent fb54c4e0
......@@ -3262,8 +3262,13 @@ FILE* __cdecl _Fiopen(const char *name, int mode, int prot)
TRACE("(%s %d %d)\n", name, mode, prot);
#if _MSVCP_VER >= 71 && _MSVCP_VER <= 90
if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
return NULL;
#else
if(!MultiByteToWideChar(CP_ACP, 0, name, -1, nameW, FILENAME_MAX-1))
return NULL;
#endif
return _Fiopen_wchar(nameW, mode, prot);
}
......
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