Limit max user name length for offline account in server
This commit is contained in:
parent
92b40a986f
commit
f316a83c63
@ -3547,8 +3547,11 @@ void ServerLobby::handleUnencryptedConnection(std::shared_ptr<STKPeer> peer,
|
||||
{
|
||||
core::stringw name;
|
||||
data.decodeStringW(&name);
|
||||
// 30 to make it consistent with stk-addons max user name length
|
||||
if (name.empty())
|
||||
name = L"unnamed";
|
||||
else if (name.size() > 30)
|
||||
name = name.subString(0, 30);
|
||||
float default_kart_color = data.getFloat();
|
||||
HandicapLevel handicap = (HandicapLevel)data.getUInt8();
|
||||
auto player = std::make_shared<NetworkPlayerProfile>
|
||||
|
Loading…
Reference in New Issue
Block a user