Skip to content

Commit 8bf62f0

Browse files
committed
修复大JSON被分包时解析失败的问题
查找换行符时,使用了数组 data[i],而不是 buf[i]。当大JSON被分包时(一次断数十个断点必现),data 只包含当前包的数据,导致json解析失败。 libc++abi: terminating due to uncaught exception of type nlohmann::detail::parse_error: [json.exception.parse_error.101] parse error at line 1, column 4566: syntax error while parsing object key - invalid string: missing closing quote; last read: '"f'; expected string literal
1 parent b4b10e1 commit 8bf62f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

emmy_debugger/src/transporter/transporter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void Transporter::Receive(const char* data, size_t len)
8686
size_t start = pos;
8787
for (size_t i = pos; i < receiveSize; i++)
8888
{
89-
if (data[i] == '\n')
89+
if (buf[i] == '\n')
9090
{
9191
pos = i + 1;
9292
break;

0 commit comments

Comments
 (0)