chore: default size to 33 on LU(W)Strings since that's the most common lenght (#1410)

Was doing this on other places, but not the main one
This commit is contained in:
Aaron Kimbrell
2024-01-12 14:23:44 -06:00
committed by GitHub
parent 8b6fb8fb44
commit 0bc12141c3
9 changed files with 19 additions and 19 deletions

View File

@@ -677,7 +677,7 @@ void HandleMasterPacket(Packet* packet) {
CINSTREAM_SKIP_HEADER;
uint32_t sessionKey = 0;
inStream.Read(sessionKey);
LUWString username(33);
LUWString username;
inStream.Read(username);
//Find them:
@@ -761,7 +761,7 @@ void HandleMasterPacket(Packet* packet) {
CINSTREAM_SKIP_HEADER;
uint32_t sessionKey = inStream.Read(sessionKey);
LUString username(33);
LUString username;
inStream.Read(username);
LOG("Got new session alert for user %s", username.string.c_str());
//Find them:
@@ -847,10 +847,10 @@ void HandlePacket(Packet* packet) {
switch (static_cast<eWorldMessageType>(packet->data[3])) {
case eWorldMessageType::VALIDATION: {
CINSTREAM_SKIP_HEADER;
LUWString username(33);
LUWString username;
inStream.Read(username);
LUWString sessionKey(33);
LUWString sessionKey;
// sometimes client puts a null terminator at the end of the checksum and sometimes doesn't, weird
inStream.Read(sessionKey);
LUString clientDatabaseChecksum(32);