Fixed the invalid packet splitting algorithm

This commit is contained in:
WolverinDEV 2020-04-25 11:25:59 +02:00
parent 5842bbe067
commit bcbff04979

View File

@ -449,12 +449,12 @@ namespace ts {
this->packet_id_bytes[1] = id & 0xFFU; 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]; return (uint16_t) (this->packet_id_bytes[0] << 8U) | this->packet_id_bytes[1];
} }
[[nodiscard]] inline auto packet_type() const { [[nodiscard]] inline auto packet_type() const {
return (PacketType) (this->type_and_flags & 0xF); return (PacketType) (this->type_and_flags & 0xFU);
} }
private: private:
void object_freed(); void object_freed();