Index: src/base/utils/random-number-generator.cc |
diff --git a/src/base/utils/random-number-generator.cc b/src/base/utils/random-number-generator.cc |
index ff428402b6b7c92faf4dab6cb8569458606ade32..3a6f2c63cf96c845802f1e0ae0d86a161e3c38fb 100644 |
--- a/src/base/utils/random-number-generator.cc |
+++ b/src/base/utils/random-number-generator.cc |
@@ -124,10 +124,10 @@ int RandomNumberGenerator::Next(int bits) { |
void RandomNumberGenerator::SetSeed(int64_t seed) { |
- if (seed == 0) seed = 1; |
initial_seed_ = seed; |
state0_ = MurmurHash3(bit_cast<uint64_t>(seed)); |
- state1_ = MurmurHash3(state0_); |
+ state1_ = MurmurHash3(~state0_); |
+ CHECK(state0_ != 0 || state1_ != 0); |
} |