diff --git a/dCommon/dEnums/MessageType/World.h b/dCommon/dEnums/MessageType/World.h index acca62466..00b787b93 100644 --- a/dCommon/dEnums/MessageType/World.h +++ b/dCommon/dEnums/MessageType/World.h @@ -5,7 +5,8 @@ namespace MessageType { enum class World : uint32_t { - VALIDATION = 1, // Session info + INVALID = 0, + VALIDATION, // Session info CHARACTER_LIST_REQUEST, CHARACTER_CREATE_REQUEST, LOGIN_REQUEST, // Character selected diff --git a/dWorldServer/WorldServer.cpp b/dWorldServer/WorldServer.cpp index c6c894b4c..442655068 100644 --- a/dWorldServer/WorldServer.cpp +++ b/dWorldServer/WorldServer.cpp @@ -1397,7 +1397,7 @@ void HandlePacket(Packet* packet) { default: // Need to use memcpy instead of reinterpret_cast to avoid UB - MessageType::World messageId; + auto messageId = MessageType::World::INVALID; std::memcpy(&messageId, &packet->data[3], sizeof(MessageType::World)); const std::string_view messageIdString = StringifiedEnum::ToString(messageId);