fix: Remove instances of undefined behavior

This commit is contained in:
jadebenn
2024-11-21 02:05:29 -06:00
parent 53877a0bc3
commit 30d4076808
15 changed files with 71 additions and 65 deletions

View File

@@ -1396,7 +1396,7 @@ void HandlePacket(Packet* packet) {
}
default:
const auto messageId = *reinterpret_cast<MessageType::World*>(&packet->data[3]);
const auto messageId = static_cast<MessageType::World>(packet->data[3]);
const std::string_view messageIdString = StringifiedEnum::ToString(messageId);
LOG("Unknown world packet received: %4i, %s", messageId, messageIdString.data());
}