Fix message length error

This commit is contained in:
hsaturn
2021-08-09 03:00:28 +02:00
parent c4cf39ab68
commit 56a2be621f

View File

@@ -665,7 +665,7 @@ void MqttMessage::incoming(char in_byte)
state = Length;
break;
case Length:
size = (size<<7) + (in_byte & 0x3F);
size = (size<<7) + (in_byte & 0x7F);
if (size > MaxBufferLength)
{
state = Error;