Fixed an error with array out of bounds
This commit is contained in:
@ -1039,7 +1039,7 @@ void zh_espnow_switch_send_mqtt_json_config_message(const zh_espnow_data_t *devi
|
|||||||
memset(qos, 0, 4);
|
memset(qos, 0, 4);
|
||||||
sprintf(qos, "%d", device_data->payload_data.config_message.switch_config_message.qos);
|
sprintf(qos, "%d", device_data->payload_data.config_message.switch_config_message.qos);
|
||||||
zh_json_t json = {0};
|
zh_json_t json = {0};
|
||||||
char buffer[512] = {0};
|
char buffer[1024] = {0};
|
||||||
zh_json_init(&json);
|
zh_json_init(&json);
|
||||||
zh_json_add(&json, "platform", "mqtt");
|
zh_json_add(&json, "platform", "mqtt");
|
||||||
zh_json_add(&json, "name", name);
|
zh_json_add(&json, "name", name);
|
||||||
|
Reference in New Issue
Block a user