From 7c824ef69049da70e842660293c692b3896173ed Mon Sep 17 00:00:00 2001 From: Shivendra Agarwal Date: Fri, 20 Jul 2018 03:25:06 +0530 Subject: [PATCH] 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. --- include/flatbuffers/flexbuffers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/flatbuffers/flexbuffers.h b/include/flatbuffers/flexbuffers.h index d7a0ef048..1fb0485c1 100644 --- a/include/flatbuffers/flexbuffers.h +++ b/include/flatbuffers/flexbuffers.h @@ -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) {