diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 67643de3ef6..9add722014e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2011-09-24 John Salmon + + PR libstdc++/50510 + * include/bits/random.tcc (seed_seq::generate): Fix computation. + 2011-09-24 John Salmon PR libstdc++/50509 diff --git a/libstdc++-v3/include/bits/random.tcc b/libstdc++-v3/include/bits/random.tcc index d35f2f4cf9a..0e74848ff3c 100644 --- a/libstdc++-v3/include/bits/random.tcc +++ b/libstdc++-v3/include/bits/random.tcc @@ -2796,8 +2796,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Type __r4 = __r3 - __k % __n; __r4 = __detail::__mod<_Type, __detail::_Shift<_Type, 32>::__value>(__r4); - __begin[(__k + __p) % __n] ^= __r4; - __begin[(__k + __q) % __n] ^= __r3; + __begin[(__k + __p) % __n] ^= __r3; + __begin[(__k + __q) % __n] ^= __r4; __begin[__k % __n] = __r4; } }