aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/ProtocolBuffers/CodedOutputStream.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src/ProtocolBuffers/CodedOutputStream.cs')
-rw-r--r--csharp/src/ProtocolBuffers/CodedOutputStream.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/csharp/src/ProtocolBuffers/CodedOutputStream.cs b/csharp/src/ProtocolBuffers/CodedOutputStream.cs
index 53f04c77..b91d6d70 100644
--- a/csharp/src/ProtocolBuffers/CodedOutputStream.cs
+++ b/csharp/src/ProtocolBuffers/CodedOutputStream.cs
@@ -274,7 +274,7 @@ namespace Google.Protobuf
/// <param name="value">The value to write</param>
public void WriteMessage(IMessage value)
{
- WriteRawVarint32((uint) value.CalculateSize());
+ WriteLength(value.CalculateSize());
value.WriteTo(this);
}
@@ -285,7 +285,7 @@ namespace Google.Protobuf
/// <param name="value">The value to write</param>
public void WriteBytes(ByteString value)
{
- WriteRawVarint32((uint) value.Length);
+ WriteLength(value.Length);
value.WriteRawBytesTo(this);
}