Commit df3c911c authored by Alexandre Julliard's avatar Alexandre Julliard

mscoree: Store the Mono base directory in Unicode.

parent 0a443c1f
......@@ -711,7 +711,7 @@ static BOOL get_mono_path_registry(LPWSTR path)
static BOOL get_mono_path_dos(const WCHAR *dir, LPWSTR path)
{
static const WCHAR unix_prefix[] = {'\\','\\','?','\\','u','n','i','x','\\'};
static const char basedir[] = "\\wine-mono-" WINE_MONO_VERSION;
static const WCHAR basedir[] = L"\\wine-mono-" WINE_MONO_VERSION;
LPWSTR dos_dir;
WCHAR mono_dll_path[MAX_PATH];
DWORD len;
......@@ -720,10 +720,10 @@ static BOOL get_mono_path_dos(const WCHAR *dir, LPWSTR path)
if (memcmp(dir, unix_prefix, sizeof(unix_prefix)) == 0)
return FALSE; /* No drive letter for this directory */
len = lstrlenW( dir ) + MultiByteToWideChar( CP_UNIXCP, 0, basedir, -1, NULL, 0 );
len = lstrlenW( dir ) + lstrlenW( basedir ) + 1;
if (!(dos_dir = heap_alloc( len * sizeof(WCHAR) ))) return FALSE;
lstrcpyW( dos_dir, dir );
MultiByteToWideChar( CP_UNIXCP, 0, basedir, -1, dos_dir + lstrlenW(dos_dir), len - lstrlenW(dos_dir));
lstrcatW( dos_dir, basedir );
ret = find_mono_dll(dos_dir, mono_dll_path);
if (ret)
......
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