Fix type of Adafruit_MQTT_Subscribe::lastread
The lastread array stores the data bytes of the most recently read received packet. It was previously declared as an array of pointers to uint8_t, instead of an array of uint8_t, which obviously was not the intention. Because the examples explicitely cast to (char*) for printing (because Print::println(uint8_t[]) is not defined) and a pointer is at least as big as uint8_t and memcpy uses void*, this problem did not show up before.
This commit is contained in:
parent
565d9afd36
commit
22c3533745
@ -202,7 +202,7 @@ class Adafruit_MQTT_Subscribe {
|
|||||||
const char *topic;
|
const char *topic;
|
||||||
uint8_t qos;
|
uint8_t qos;
|
||||||
|
|
||||||
uint8_t * lastread[SUBSCRIPTIONDATALEN];
|
uint8_t lastread[SUBSCRIPTIONDATALEN];
|
||||||
private:
|
private:
|
||||||
Adafruit_MQTT *mqtt;
|
Adafruit_MQTT *mqtt;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user