From fa3a7649fd2e35a3001066dd0d28d6f058e5dbf1 Mon Sep 17 00:00:00 2001 From: David Lin Date: Fri, 1 Jan 2021 22:08:58 +0800 Subject: [PATCH] Fixed bug in tencent_firmware_mqtt_iot_explorer.c --- .../tencent_firmware_mqtt_iot_explorer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tencent_firmware_mqtt_iot_explorer/tencent_firmware_mqtt_iot_explorer.c b/examples/tencent_firmware_mqtt_iot_explorer/tencent_firmware_mqtt_iot_explorer.c index 6836863c..8e3f18a5 100644 --- a/examples/tencent_firmware_mqtt_iot_explorer/tencent_firmware_mqtt_iot_explorer.c +++ b/examples/tencent_firmware_mqtt_iot_explorer/tencent_firmware_mqtt_iot_explorer.c @@ -73,7 +73,7 @@ void mqtt_demo_task(void) printf("module mqtt sub success\n"); } - memset(report_topic_name, sizeof(report_topic_name), 0); + memset(report_topic_name, 0, sizeof(report_topic_name)); size = snprintf(report_topic_name, TOPIC_NAME_MAX_SIZE, "$thing/up/property/%s/%s", product_id, device_name); if (size < 0 || size > sizeof(report_topic_name) - 1) {