mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 12:21:23 +00:00
Fixed AddFlatBuffer using wrong buffer length.
Also made the Xcode project link. Tested: on OS X.
This commit is contained in:
@@ -393,8 +393,8 @@ void ReflectionTest(uint8_t *flatbuf, size_t length) {
|
||||
// We do this last, so the pointer doesn't get invalidated (since it is
|
||||
// at the end of the buffer):
|
||||
auto string_ptr = flatbuffers::AddFlatBuffer(resizingbuf,
|
||||
stringfbb.GetBufferPointer(),
|
||||
stringfbb.GetSize());
|
||||
stringfbb.GetBufferPointer(),
|
||||
stringfbb.GetSize());
|
||||
// Finally, set the new value in the vector.
|
||||
rtestarrayofstring->MutateOffset(2, string_ptr);
|
||||
TEST_EQ_STR(rtestarrayofstring->Get(0)->c_str(), "bob");
|
||||
|
||||
Reference in New Issue
Block a user