Fix buffer length for p254bx buttons

This commit is contained in:
fvanroie 2021-01-27 17:53:47 +01:00
parent 3a6a3ebf60
commit 81bf4f7ea5

View File

@ -140,7 +140,7 @@ void mqtt_send_lwt(bool online)
void mqtt_send_object_state(uint8_t pageid, uint8_t btnid, char * payload)
{
char tmp_topic[strlen(mqttNodeTopic) + 12];
char tmp_topic[strlen(mqttNodeTopic) + 16];
snprintf_P(tmp_topic, sizeof(tmp_topic), PSTR("%sstate/p%ub%u"), mqttNodeTopic, pageid, btnid);
bool res = mqttPublish(tmp_topic, payload);
}