fix type return value

This commit is contained in:
hsaturn
2022-01-05 02:00:59 +01:00
parent 8fe3517894
commit 737e217172

View File

@@ -111,7 +111,7 @@ class MqttMessage
Type type() const
{
return state == Complete ? static_cast<Type>(buffer[0]) : Unknown;
return state == Complete ? static_cast<Type>(buffer[0] & 0xF0) : Unknown;
}
uint8_t flags() const { return static_cast<uint8_t>(buffer[0] & 0x0F); }