mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-05 18:24:12 +00:00
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:
@@ -95,7 +95,7 @@ void AuthPackets::HandleLoginRequest(dServer* server, Packet* packet) {
|
||||
std::vector<Stamp> stamps;
|
||||
stamps.emplace_back(eStamps::PASSPORT_AUTH_START, 0);
|
||||
|
||||
LUWString usernameLUString(33);
|
||||
LUWString usernameLUString;
|
||||
inStream.Read(usernameLUString);
|
||||
const auto username = usernameLUString.GetAsString();
|
||||
|
||||
|
@@ -12,7 +12,7 @@ struct LUString {
|
||||
std::string string;
|
||||
uint32_t size;
|
||||
|
||||
LUString(uint32_t size) {
|
||||
LUString(uint32_t size = 33) {
|
||||
this->size = size;
|
||||
};
|
||||
LUString(std::string string, uint32_t size = 33) {
|
||||
@@ -28,7 +28,7 @@ struct LUWString {
|
||||
std::u16string string;
|
||||
uint32_t size;
|
||||
|
||||
LUWString(uint32_t size) {
|
||||
LUWString(uint32_t size = 33) {
|
||||
this->size = size;
|
||||
};
|
||||
LUWString(std::u16string string, uint32_t size = 33) {
|
||||
|
@@ -99,7 +99,7 @@ void MasterPackets::HandleServerInfo(Packet* packet) {
|
||||
uint32_t theirPort = 0;
|
||||
uint32_t theirZoneID = 0;
|
||||
uint32_t theirInstanceID = 0;
|
||||
LUString theirIP(33);
|
||||
LUString theirIP;
|
||||
|
||||
inStream.Read(theirPort);
|
||||
inStream.Read(theirZoneID);
|
||||
|
Reference in New Issue
Block a user