aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/Google.Protobuf/ByteString.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src/Google.Protobuf/ByteString.cs')
-rw-r--r--csharp/src/Google.Protobuf/ByteString.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/csharp/src/Google.Protobuf/ByteString.cs b/csharp/src/Google.Protobuf/ByteString.cs
index dd7f22d6..5c652cc3 100644
--- a/csharp/src/Google.Protobuf/ByteString.cs
+++ b/csharp/src/Google.Protobuf/ByteString.cs
@@ -303,7 +303,7 @@ namespace Google.Protobuf
int ret = 23;
foreach (byte b in bytes)
{
- ret = (ret << 8) | b;
+ ret = (ret * 31) + b;
}
return ret;
}