Fix bug in 'CServer::AuthClient'

The IP that is sent to the server should be in base format only (no brackets or port). The buffer size was also too small to contain the entire length of the full IP address with port and brackets.
This commit is contained in:
Kawe Mazidjatari 2023-04-22 20:30:53 +02:00
parent d56c24ce05
commit 13fcdaa442

View File

@ -88,8 +88,8 @@ bool CServer::AuthClient(user_creds_s* pChallenge)
char* pszPersonaName = pChallenge->personaName;
uint64_t nNucleusID = pChallenge->personaId;
char pszAddresBuffer[INET6_ADDRSTRLEN]; // Render the client's address.
pChallenge->netAdr.ToString(pszAddresBuffer, sizeof(pszAddresBuffer));
char pszAddresBuffer[128]; // Render the client's address.
pChallenge->netAdr.ToString(pszAddresBuffer, sizeof(pszAddresBuffer), true);
const bool bEnableLogging = sv_showconnecting->GetBool();
if (bEnableLogging)