diff --git a/src/Etterna/Singletons/DownloadManager.cpp b/src/Etterna/Singletons/DownloadManager.cpp index 19ea133c5d..e11611a5df 100644 --- a/src/Etterna/Singletons/DownloadManager.cpp +++ b/src/Etterna/Singletons/DownloadManager.cpp @@ -192,16 +192,17 @@ EmptyTempDLFileDir() #pragma region curl inline std::string useragent() { - return fmt::format("Etterna/{} ({})", + static auto agent = fmt::format("Etterna/{} ({})", GAMESTATE->GetEtternaVersion(), Core::Platform::getSystem()); + return agent; } inline CURL* initBasicCURLHandle() { CURL* curlHandle = curl_easy_init(); - curl_easy_setopt_log_err(curlHandle, CURLOPT_USERAGENT, useragent()); + curl_easy_setopt_log_err(curlHandle, CURLOPT_USERAGENT, useragent().c_str()); curl_easy_setopt_log_err(curlHandle, CURLOPT_ACCEPT_ENCODING, ""); curl_easy_setopt_log_err(curlHandle, CURLOPT_SSL_VERIFYPEER, 0L); curl_easy_setopt_log_err(curlHandle, CURLOPT_SSL_VERIFYHOST, 0L);