提交 be22cacc 编写于 作者: A Adam Barth 提交者: GitHub

Fix crash due to typo (#3132)

I meant to compare these values, not assign them.
上级 d4a5e367
......@@ -52,8 +52,8 @@ void PlatformMessage::InvokeCallback(std::vector<char> data) {
Dart_TypedData_Type type;
DART_CHECK_VALID(
Dart_TypedDataAcquireData(byte_buffer, &type, &buffer, &length));
FTL_CHECK(type = Dart_TypedData_kByteData);
FTL_CHECK(length = data.size());
FTL_CHECK(type == Dart_TypedData_kByteData);
FTL_CHECK(static_cast<size_t>(length) == data.size());
memcpy(buffer, data.data(), length);
Dart_TypedDataReleaseData(byte_buffer);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册