diff mbox

[v3] libstdc++/50510

Message ID 4E7E5B33.4070609@oracle.com
State New
Headers show

Commit Message

Paolo Carlini Sept. 24, 2011, 10:35 p.m. UTC
Hi,

committed to mainline and 4_6-branch.

Paolo.

///////////////////////
2011-09-24  John Salmon  <john.salmon@deshaw.com>

	PR libstdc++/50510
	* include/bits/random.tcc (seed_seq::generate): Fix computation.
diff mbox

Patch

Index: include/bits/random.tcc
===================================================================
--- include/bits/random.tcc	(revision 179144)
+++ include/bits/random.tcc	(working copy)
@@ -2796,8 +2796,8 @@ 
 	  _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;
 	}
     }