From 56a2be621f446cf8f0801e9a81cdc19cc42dbcc5 Mon Sep 17 00:00:00 2001 From: hsaturn Date: Mon, 9 Aug 2021 03:00:28 +0200 Subject: [PATCH] Fix message length error --- src/TinyMqtt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TinyMqtt.cpp b/src/TinyMqtt.cpp index f6fe9fe..4ed0c22 100644 --- a/src/TinyMqtt.cpp +++ b/src/TinyMqtt.cpp @@ -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;