This commit is contained in:
Wouter van Oortmerssen 2016-04-13 17:44:23 -07:00
commit 791c83aa7e
1 changed files with 5 additions and 2 deletions

View File

@ -1051,8 +1051,11 @@ FLATBUFFERS_FINAL_CLASS
uint8_t **buf) {
NotNested();
StartVector(len, elemsize);
*buf = buf_.make_space(len * elemsize);
return EndVector(len);
buf_.make_space(len * elemsize);
auto vec_start = GetSize();
auto vec_end = EndVector(len);
*buf = buf_.data_at(vec_start);
return vec_end;
}
/// @brief Specialized version of `CreateVector` for non-copying use cases.