diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h index e513e7938..da1c2c9c2 100644 --- a/include/flatbuffers/flatbuffers.h +++ b/include/flatbuffers/flatbuffers.h @@ -601,7 +601,8 @@ class vector_downward { } inline uint8_t *make_space(size_t len) { - cur_ -= ensure_space(len); + size_t space = ensure_space(len); + cur_ -= space; return cur_; }