Commit 7c824ef6 authored by Shivendra Agarwal's avatar Shivendra Agarwal Committed by Wouter van Oortmerssen

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.
parent 6bfa107f
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment