mirror of
https://github.com/SWG-Source/src.git
synced 2026-07-13 21:01:08 -04:00
Only resize if length is longer than max_account_name_length
This commit is contained in:
@@ -175,7 +175,10 @@ void ClientConnection::validateClient(const std::string & id, const std::string
|
||||
// to avoid having to re-type this stupid var all over the place
|
||||
// ideally we wouldn't copy this here, but it would be a huge pain
|
||||
std::string tmp = trim(id);
|
||||
tmp.resize(MAX_ACCOUNT_NAME_LENGTH); // truncate name after the trim
|
||||
|
||||
if (tmp.length() > MAX_ACCOUNT_NAME_LENGTH) {
|
||||
tmp.resize(MAX_ACCOUNT_NAME_LENGTH); // truncate name after the trim
|
||||
}
|
||||
|
||||
const std::string trimmedId = tmp;
|
||||
const std::string trimmedKey = trim(key);
|
||||
|
||||
Reference in New Issue
Block a user