mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-27 13:12:18 +00:00
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:
committed by
Wouter van Oortmerssen
parent
6bfa107f4e
commit
7c824ef690
@@ -1443,7 +1443,7 @@ class Builder FLATBUFFERS_FINAL_CLASS {
|
|||||||
}
|
}
|
||||||
// If you get this assert, your fixed types are not one of:
|
// If you get this assert, your fixed types are not one of:
|
||||||
// Int / UInt / Float / Key.
|
// Int / UInt / Float / Key.
|
||||||
FLATBUFFERS_ASSERT(IsTypedVectorElementType(vector_type));
|
FLATBUFFERS_ASSERT(!fixed || IsTypedVectorElementType(vector_type));
|
||||||
auto byte_width = Align(bit_width);
|
auto byte_width = Align(bit_width);
|
||||||
// Write vector. First the keys width/offset if available, and size.
|
// Write vector. First the keys width/offset if available, and size.
|
||||||
if (keys) {
|
if (keys) {
|
||||||
|
|||||||
Reference in New Issue
Block a user