eclipse / paho.mqtt-sn.embedded-c

Paho C MQTT-SN gateway and libraries for embedded systems. Paho is an Eclipse IoT project.
https://eclipse.org/paho
Other
314 stars 179 forks source link

Fix bug for messages of length 0x100 #186

Closed martinkirsche closed 4 years ago

martinkirsche commented 4 years ago

If the parameter length is 255 bytes the result of the previous MQTTSNPacket_len implementation was 256 bytes. But such a message actually needs a 3-octet long Length field, so it should return 258 instead.