gengxin
authorCCC <2393524978@qq.com>
Sat, 25 Nov 2023 01:40:03 +0000 (09:40 +0800)
committerCCC <2393524978@qq.com>
Sat, 25 Nov 2023 01:40:03 +0000 (09:40 +0800)
2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.c

index b104407..3d012f7 100644 (file)
@@ -2995,14 +2995,15 @@ bool mmi_protocol_fzd_action_hengai_sleep_data(char * file_buf, uint32_t file_si
        unsigned char * content_buff = NULL;
        unsigned int content_lenth = 0;
 
-       content_buff = (unsigned char *)lv_mem_alloc(file_size + 1);
+       content_buff = (unsigned char *)lv_mem_alloc(file_size + 2);
        if(NULL == content_buff)
        {
                PROTOCOL_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
                return false;
        }
-       _lv_memset_00(content_buff, file_size + 1);
-       _lv_memcpy(content_buff, file_buf, file_size);
+       _lv_memset_00(content_buff, file_size + 2);
+       sprintf(content_buff, ",");
+       _lv_memcpy(content_buff + 1, file_buf, file_size);
        content_lenth = file_size;
        
        result = mmi_protocol_fzd_send_with_data(action, content_buff, content_lenth);