diff --git a/include/flatbuffers/grpc.h b/include/flatbuffers/grpc.h index 7472c31d4..500df8467 100644 --- a/include/flatbuffers/grpc.h +++ b/include/flatbuffers/grpc.h @@ -121,7 +121,7 @@ class SliceAllocator : public Allocator { memcpy_downward(old_p, old_size, new_p, new_size, in_use_back, in_use_front); slice_ = new_slice; - return new_p; + return const_cast(slice_.begin()); } private: