summaryrefslogtreecommitdiffstats
path: root/Modules/_randommodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_randommodule.c')
-rw-r--r--Modules/_randommodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c
index 2718b69..05c09d8 100644
--- a/Modules/_randommodule.c
+++ b/Modules/_randommodule.c
@@ -355,7 +355,7 @@ random_setstate(RandomObject *self, PyObject *state)
for (i=0; i<N ; i++) {
element = PyLong_AsUnsignedLong(PyTuple_GET_ITEM(state, i));
- if (element == -1 && PyErr_Occurred())
+ if (element == (unsigned long)-1 && PyErr_Occurred())
return NULL;
self->state[i] = element & 0xffffffffUL; /* Make sure we get sane state */
}