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) {