Skip to content

Commit 1292b8c

Browse files
committed
Fix _willMessageIndex not being initialized in the constructor
1 parent fbd7569 commit 1292b8c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/MqttClient.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ MqttClient::MqttClient(Client& client) :
7272
_rxState(MQTT_CLIENT_RX_STATE_READ_TYPE),
7373
_willBuffer(NULL),
7474
_willBufferIndex(0),
75+
_willMessageIndex(0),
7576
_willFlags(0x00)
7677
{
7778
setTimeout(0);
@@ -181,7 +182,7 @@ int MqttClient::beginMessage(const String& topic, unsigned long size, bool retai
181182

182183
int MqttClient::beginMessage(const char* topic, bool retain, uint8_t qos, bool dup)
183184
{
184-
return beginMessage(topic, 0xffffffff, retain, qos, dup);
185+
return beginMessage(topic, 0xffffffffL, retain, qos, dup);
185186
}
186187

187188
int MqttClient::beginMessage(const String& topic, bool retain, uint8_t qos, bool dup)

0 commit comments

Comments
 (0)