Merge with 3.3

This commit is contained in:
Kristján Valur Jónsson 2014-03-04 23:22:15 +00:00
commit 25ea45db81
2 changed files with 13 additions and 1 deletions

View file

@ -807,7 +807,7 @@ rangeiter_setstate(rangeiterobject *r, PyObject *state)
long index = PyLong_AsLong(state);
if (index == -1 && PyErr_Occurred())
return NULL;
if (index < 0 || index >= r->len) {
if (index < 0 || index > r->len) {
PyErr_SetString(PyExc_ValueError, "index out of range");
return NULL;
}