mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 09:35:52 +00:00
msvcp60: Use 'MultiByteToWideChar' in __Fiopen implementation.
Based on a patch by Yeshun Ye.
This commit is contained in:
parent
dc1fa72d1d
commit
fb54c4e0a4
|
@ -26,6 +26,7 @@
|
|||
#include "msvcp.h"
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "windows.h"
|
||||
#include "wine/debug.h"
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msvcp);
|
||||
|
||||
|
@ -2128,7 +2129,7 @@ FILE* __cdecl ___Fiopen(const char *name, int 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 _Fiopen_wchar(nameW, mode, _SH_DENYNO);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue