Remove static buffers from StringHelpers to prevent overwriting strings from another thread.

This commit is contained in:
Soggy_Pancake 2026-03-19 18:09:34 -07:00
parent 3f7745b262
commit 5d459c0ff9
15 changed files with 68 additions and 55 deletions

View file

@ -1390,14 +1390,14 @@ static int RunHeadlessServer()
Settings serverSettings(new File(L"server.properties"));
const wstring configuredBindIp = serverSettings.getString(L"server-ip", L"");
const char* bindIp = "*";
std::string bindIp = "*";
if (g_Win64DedicatedServerBindIP[0] != 0)
{
bindIp = g_Win64DedicatedServerBindIP;
}
else if (!configuredBindIp.empty())
{
bindIp = wstringtochararray(configuredBindIp);
bindIp = wstringtostring(configuredBindIp);
}
const int port = g_Win64DedicatedServerPort > 0 ? g_Win64DedicatedServerPort : serverSettings.getInt(L"server-port", WIN64_NET_DEFAULT_PORT);