summaryrefslogtreecommitdiffstats
path: root/Objects/rangeobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/rangeobject.c')
-rw-r--r--Objects/rangeobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
index 5c794fc..0deabe9 100644
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -193,9 +193,9 @@ range_contains(rangeobject *r, PyObject *obj)
if (num < 0 && PyErr_Occurred())
return -1;
- if (num < r->start || (num - r->start) % r->step)
+ if ((num < r->start) || ((num - r->start) % r->step))
return 0;
- if (num > (r->start + (r->len * r->step)))
+ if (num >= (r->start + (r->len * r->step)))
return 0;
return 1;
}