diff --git a/src/proto/protoio.cc b/src/proto/protoio.cc index 93c57493fd..2efcc2744e 100644 --- a/src/proto/protoio.cc +++ b/src/proto/protoio.cc @@ -87,7 +87,7 @@ ProtoOutputStream::write(const Message& msg) io::CodedOutputStream codedStream(zeroCopyStream); // Write the size of the message to the stream - codedStream.WriteVarint32(msg.ByteSize()); + codedStream.WriteVarint32(msg.ByteSizeLong()); // Write the message itself to the stream msg.SerializeWithCachedSizes(&codedStream);