summaryrefslogtreecommitdiffstats
path: root/Modules/_randommodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_randommodule.c')
-rw-r--r--Modules/_randommodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c
index 1fa899c..4377ee0 100644
--- a/Modules/_randommodule.c
+++ b/Modules/_randommodule.c
@@ -179,7 +179,7 @@ init_by_array(RandomObject *self, unsigned long init_key[], size_t key_length)
k = (N>key_length ? N : key_length);
for (; k; k--) {
mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1664525UL))
- + init_key[j] + j; /* non linear */
+ + init_key[j] + (unsigned long)j; /* non linear */
mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */
i++; j++;
if (i>=N) { mt[0] = mt[N-1]; i=1; }
@@ -187,7 +187,7 @@ init_by_array(RandomObject *self, unsigned long init_key[], size_t key_length)
}
for (k=N-1; k; k--) {
mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1566083941UL))
- - i; /* non linear */
+ - (unsigned long)i; /* non linear */
mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */
i++;
if (i>=N) { mt[0] = mt[N-1]; i=1; }