summaryrefslogtreecommitdiffstats
path: root/libcxx/include
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include')
-rw-r--r--libcxx/include/random4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/random b/libcxx/include/random
index 89664a6ca33..724bd0fc215 100644
--- a/libcxx/include/random
+++ b/libcxx/include/random
@@ -2337,7 +2337,7 @@ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b,
for (size_t __i = 1; __i < __n; ++__i)
if (__x_[__i] != 0)
return;
- __x_[0] = _Max;
+ __x_[0] = result_type(1) << (__w - 1);
}
}
@@ -2363,7 +2363,7 @@ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b,
for (size_t __i = 1; __i < __n; ++__i)
if (__x_[__i] != 0)
return;
- __x_[0] = _Max;
+ __x_[0] = result_type(1) << (__w - 1);
}
}
OpenPOWER on IntegriCloud