Fixing an assert in flexbuffers CreateVector (#4824)

An assert was blocking the creation of typedvectors. It was wrongly checking for limited types even though vector was not of fixedTyped.
This commit is contained in:
Shivendra Agarwal
2018-07-20 03:25:06 +05:30
committed by Wouter van Oortmerssen
parent 6bfa107f4e
commit 7c824ef690

View File

@@ -1443,7 +1443,7 @@ class Builder FLATBUFFERS_FINAL_CLASS {
}
// If you get this assert, your fixed types are not one of:
// Int / UInt / Float / Key.
FLATBUFFERS_ASSERT(IsTypedVectorElementType(vector_type));
FLATBUFFERS_ASSERT(!fixed || IsTypedVectorElementType(vector_type));
auto byte_width = Align(bit_width);
// Write vector. First the keys width/offset if available, and size.
if (keys) {