From 1e0294f301fe96dc8f9687fd8474237570411c64 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Mon, 7 Jul 2025 18:51:39 +0800 Subject: [PATCH] =?utf8?q?=E8=A7=A3=E5=86=B3=E5=9B=9E=E7=AD=94=E9=97=AE?= =?utf8?q?=E9=A2=98=E5=A4=AA=E9=95=BF=E5=AF=BC=E8=87=B4=E4=B8=8D=E8=83=BD?= =?utf8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../drivers/peripheral/slip/cat1Service/cat1_ws.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/code/sdk/drivers/peripheral/slip/cat1Service/cat1_ws.cpp b/code/sdk/drivers/peripheral/slip/cat1Service/cat1_ws.cpp index 4da61b191..4ad686766 100644 --- a/code/sdk/drivers/peripheral/slip/cat1Service/cat1_ws.cpp +++ b/code/sdk/drivers/peripheral/slip/cat1Service/cat1_ws.cpp @@ -1044,7 +1044,7 @@ bool send_ai_txt(uint8_t type,char *msg) // {"type":"middle","content":"我是","task_id":"","reasoning_content":""} -char content_str_chat[64]={0}; +// char content_str_chat[64]={0}; bool chat_result_analysis(char *buf) { @@ -1069,8 +1069,10 @@ bool chat_result_analysis(char *buf) { if(strlen(content_str)>0) { - memset_s(content_str_chat,64,0,64); - memcpy_s(content_str_chat,64,content_str,strlen(content_str)); + // memset_s(content_str_chat,64,0,64); + // memcpy_s(content_str_chat,64,content_str,strlen(content_str)); + char *content_str_chat = (char *)malloc(strlen(content_str)+1); + strcpy(content_str_chat,content_str); ble_set_ai_Answer_str(content_str_chat,2); // uapi_start_tts_single_txt(content_str_chat); // static uint8_t test=1; @@ -1080,7 +1082,7 @@ bool chat_result_analysis(char *buf) // test=0; // } - + free(content_str_chat); } } -- 2.17.1