From 944ca18f9224e208ee3a779d36551547cc6c602a Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Fri, 28 Sep 2018 21:18:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=8F=AF=E8=83=BD=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Http/WebSocketSplitter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Http/WebSocketSplitter.cpp b/src/Http/WebSocketSplitter.cpp index d79e32f4..25589e45 100644 --- a/src/Http/WebSocketSplitter.cpp +++ b/src/Http/WebSocketSplitter.cpp @@ -141,7 +141,8 @@ begin_decode: if(remain > 0){ //剩余数据是下一个包,把它的数据放置在缓存中 - _remain_data.assign((char *)ptr,remain); + string str((char *)ptr,remain); + _remain_data = str; data = ptr = (uint8_t *)_remain_data.data(); len = _remain_data.size();