Show More
@@ -158,12 +158,12 static PyObject *index_get(indexObject * | |||
|
158 | 158 | Py_ssize_t length = index_length(self) + 1; |
|
159 | 159 | PyObject *entry; |
|
160 | 160 | |
|
161 |
if (pos == -1 |
|
|
161 | if (pos == -1) { | |
|
162 | 162 | Py_INCREF(nullentry); |
|
163 | 163 | return nullentry; |
|
164 | 164 | } |
|
165 | 165 | |
|
166 | if (pos < 0 || pos >= length) { | |
|
166 | if (pos < 0 || pos >= length - 1) { | |
|
167 | 167 | PyErr_SetString(PyExc_IndexError, "revlog index out of range"); |
|
168 | 168 | return NULL; |
|
169 | 169 | } |
General Comments 0
You need to be logged in to leave comments.
Login now