From: Piotr Caban <piotr(a)codeweavers.com> Based on a patch by Yeshun Ye. --- dlls/msvcp90/ios.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index ef2c122f17f..a8014a3dfcf 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -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); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/642