When I call FlatBufferBuilder::CreateVectorOfStructs() passing in a vector with an odd number of entries, the created vector always has zero values in the first entry.
I believe this is a regression in 72aa85a
I've created a small repro case at https://github.com/nolen777/flatbuffers-test
To reproduce:
- Clone https://github.com/nolen777/flatbuffers-test
- bazel test --test_output=errors //src/main/cpp:test
The test is just checking that the entries in the FB are the same as the entries in the original vector.
If you change the argument vector to have an even number of entries (comment out line 22 and un-comment line 19 in src/main/cpp/test.cpp), the test passes. If you change the WORKSPACE file to the previous commit, the test passes. But on commit 72aa85a or later with an odd number of entries, the test fails.