Fix crash due to typo (#3132)

I meant to compare these values, not assign them.
This commit is contained in:
Adam Barth 2016-10-13 16:03:42 -07:00 committed by GitHub
parent d4a5e3671c
commit be22caccc5

View File

@ -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);
}