From 0ebd5810e3de8d2893a3958c73f1849795e623a7 Mon Sep 17 00:00:00 2001 From: bosnichd Date: Thu, 8 Jul 2021 13:14:40 -0600 Subject: [PATCH] Fix "GameLauncher Log is Saved with Wrong File Extension" (LYN-3972). (#1984) I'm pretty sure that CryString::Format is broken, but it's slated for removal along with the rest of CrySystem, so I'm just addressing the symptom rather than the likely cause (mainly to save time, but also out of an abundance of caution in case other code is inadvertently depending on the existing behaviour of CryString::Format). Signed-off-by: bosnichd --- Code/Legacy/CrySystem/SystemInit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Legacy/CrySystem/SystemInit.cpp b/Code/Legacy/CrySystem/SystemInit.cpp index 7602ed05aa..3c1f1b4cda 100644 --- a/Code/Legacy/CrySystem/SystemInit.cpp +++ b/Code/Legacy/CrySystem/SystemInit.cpp @@ -1043,7 +1043,7 @@ string GetUniqueLogFileName(string logFileName) logFileNamePrefix = logFileName.substr(0, extensionIndex); } - logFileName.Format("%s(%d)%s", logFileNamePrefix.c_str(), instance, logFileExtension.c_str()); + logFileName = AZStd::string::format("%s(%d)%s", logFileNamePrefix.c_str(), instance, logFileExtension.c_str()).c_str(); return logFileName; }