From f47c328e2307263d79e1942df7a16149018ade26 Mon Sep 17 00:00:00 2001 From: David Lin Date: Thu, 31 Dec 2020 17:49:06 +0800 Subject: [PATCH] Fixed bug in mqtt_iot_explorer_e53_light.c --- .../demo/mqtt_iot_explorer_e53_light.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/TencentOS_tiny_EVB_G0/KEIL/mqtt_iot_explorer_e53_light/demo/mqtt_iot_explorer_e53_light.c b/board/TencentOS_tiny_EVB_G0/KEIL/mqtt_iot_explorer_e53_light/demo/mqtt_iot_explorer_e53_light.c index 73a5c01b..8fc5b696 100644 --- a/board/TencentOS_tiny_EVB_G0/KEIL/mqtt_iot_explorer_e53_light/demo/mqtt_iot_explorer_e53_light.c +++ b/board/TencentOS_tiny_EVB_G0/KEIL/mqtt_iot_explorer_e53_light/demo/mqtt_iot_explorer_e53_light.c @@ -214,7 +214,7 @@ static 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) { printf("pub topic content length not enough! content size:%d buf size:%d", size, (int)sizeof(report_topic_name));