Fix inconsistencies with buffer sizes for player names.
Found any I could not using MAX_NAME_LENGTH and changed them to use it. I think that we should increase MAX_NAME_LENGTH to 128 for CS:GO at some point as that's what it uses internally. (Presumably to get the client's full multibyte name from Steam without truncation mid-codepoint which can happen in other games. Steam's max is 32 characters if I remember correctly, but allows multibyte chars).
This commit is contained in:
@@ -457,8 +457,8 @@ public void OnReceiveUser(Database db, DBResultSet rs, const char[] error, any d
|
||||
|
||||
void FetchUser(Database db, int client)
|
||||
{
|
||||
char name[65];
|
||||
char safe_name[140];
|
||||
char name[MAX_NAME_LENGTH];
|
||||
char safe_name[(MAX_NAME_LENGTH * 2) - 1];
|
||||
char steamid[32];
|
||||
char steamidalt[32];
|
||||
char ipaddr[24];
|
||||
|
||||
Reference in New Issue
Block a user