summaryrefslogtreecommitdiffstats
path: root/src/if_python3.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-05-12 21:16:23 +0200
committerBram Moolenaar <Bram@vim.org>2013-05-12 21:16:23 +0200
commitbd80f35bc59442894a4ec56aefb0137cb0a350fa (patch)
treeb822da2358409f0c5da3b1d2c266c58f5f70a536 /src/if_python3.c
parent8f1723de4735e437b4ced3be95d6582e713c3d7d (diff)
updated for version 7.3.943v7.3.943
Problem: Python: Negative indices were failing. Solution: Fix negative indices. Add tests. (ZyX)
Diffstat (limited to 'src/if_python3.c')
-rw-r--r--src/if_python3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/if_python3.c b/src/if_python3.c
index da0867b7e0..daaf689b48 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -1114,7 +1114,7 @@ BufferSubscript(PyObject *self, PyObject* idx)
return NULL;
if (PySlice_GetIndicesEx((PyObject *)idx,
- (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count+1,
+ (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
&start, &stop,
&step, &slicelen) < 0)
{
@@ -1146,7 +1146,7 @@ BufferAsSubscript(PyObject *self, PyObject* idx, PyObject* val)
return -1;
if (PySlice_GetIndicesEx((PyObject *)idx,
- (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count+1,
+ (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
&start, &stop,
&step, &slicelen) < 0)
{