More string fixes

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-07-29 15:53:32 -07:00
parent 95c6fd83ea
commit 99bf5e54c4
43 changed files with 439 additions and 432 deletions
+2 -6
View File
@@ -505,9 +505,7 @@ bool CSystem::GetWinGameFolder(char* szMyDocumentsPath, int maxPathSize)
if (bSucceeded)
{
// Convert from UNICODE to UTF-8
AZStd::string str;
AZStd::to_string(str, AZStd::wstring(wMyDocumentsPath));
azstrcpy(szMyDocumentsPath, maxPathSize, str.c_str());
azstrcpy(szMyDocumentsPath, maxPathSize, CryStringUtils::WStrToUTF8(wMyDocumentsPath));
CoTaskMemFree(wMyDocumentsPath);
}
}
@@ -521,9 +519,7 @@ bool CSystem::GetWinGameFolder(char* szMyDocumentsPath, int maxPathSize)
bSucceeded = SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_PERSONAL | CSIDL_FLAG_CREATE, NULL, 0, wMyDocumentsPath));
if (bSucceeded)
{
AZStd::string str;
AZStd::to_string(str, AZStd::wstring(wMyDocumentsPath));
azstrcpy(szMyDocumentsPath, maxPathSize, str.c_str());
azstrcpy(szMyDocumentsPath, maxPathSize, CryStringUtils::WStrToUTF8(wMyDocumentsPath));
}
}