mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 11:16:34 +00:00
use TOPSZ for size of topic
This commit is contained in:
parent
03da44b2b4
commit
8a3f3b271a
@ -902,7 +902,7 @@ void Z_Devices::jsonPublishFlush(uint16_t shortaddr) {
|
||||
strlcpy(stemp, (!strlen(fname)) ? MQTT_TOPIC : fname, sizeof(stemp));
|
||||
MakeValidMqtt(0, stemp);
|
||||
//Create topic with Prefix3 and cleaned up friendly name
|
||||
char frtopic[13 + strlen(stemp)];
|
||||
char frtopic[TOPSZ];
|
||||
snprintf_P(frtopic, sizeof(frtopic), PSTR("%s/%s/" D_RSLT_SENSOR), SettingsText(SET_MQTTPREFIX3), stemp);
|
||||
MqttPublish(frtopic, Settings.flag.mqtt_sensor_retain);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user