Merge pull request #210 from diamante0018/fix-comp

Fix Wine
This commit is contained in:
Dss0
2022-04-05 12:55:13 +02:00
committed by GitHub
2 changed files with 13 additions and 13 deletions

View File

@ -107,9 +107,9 @@ namespace Utils
void SetEnvironment()
{
wchar_t exeName[512];
GetModuleFileNameW(GetModuleHandle(nullptr), exeName, sizeof(exeName) / 2);
GetModuleFileNameW(GetModuleHandle(nullptr), exeName, sizeof(exeName) / sizeof(wchar_t));
wchar_t* exeBaseName = wcsrchr(exeName, L'\\');
auto* exeBaseName = wcsrchr(exeName, L'\\');
exeBaseName[0] = L'\0';
SetCurrentDirectoryW(exeName);