Merge pull request #818 from cyanea-bt/windows_paths

Windows Port: Fix empty defaults for path settings
This commit is contained in:
zeromus 2024-07-22 19:43:37 -05:00 committed by GitHub
commit 8e77a8d9f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -240,7 +240,7 @@ void PathInfo::ReadKeyW(char *pathToRead, const wchar_t *key)
if (wcscmp(wpath, key) == 0) {
//since the variables are all intialized in this file they all use MAX_PATH
char temppath[MAX_PATH];
temppath[0] = 0;
strcpy(temppath, wcstombs((std::wstring)wpath).c_str());
GetDefaultPath(temppath, wcstombs((std::wstring)key).c_str(), MAX_PATH);
wcscpy(wpath,mbstowcs((std::string)temppath).c_str());
}