diff --git a/src/protocol/Packet.h b/src/protocol/Packet.h index dce57ff..9a796d9 100644 --- a/src/protocol/Packet.h +++ b/src/protocol/Packet.h @@ -449,12 +449,12 @@ namespace ts { this->packet_id_bytes[1] = id & 0xFFU; } - [[nodiscard]] inline auto packet_id() const { + [[nodiscard]] inline uint16_t packet_id() const { return (uint16_t) (this->packet_id_bytes[0] << 8U) | this->packet_id_bytes[1]; } [[nodiscard]] inline auto packet_type() const { - return (PacketType) (this->type_and_flags & 0xF); + return (PacketType) (this->type_and_flags & 0xFU); } private: void object_freed();