diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-05-12 20:36:14 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-05-12 20:36:14 +0200 |
commit | 8f1723de4735e437b4ced3be95d6582e713c3d7d (patch) | |
tree | b8e71cbe3ac73cc19ceee047a8bdd3d10d37b1a3 /src/if_python.c | |
parent | 3d0c52db9c3e2019bc5fe84debe59c042c3da20b (diff) |
updated for version 7.3.942v7.3.942
Problem: Python: SEGV in Buffer functions.
Solution: Call CheckBuffer() at the right time. (ZyX)
Diffstat (limited to 'src/if_python.c')
-rw-r--r-- | src/if_python.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/if_python.c b/src/if_python.c index 8e3621caf4..dda65affc6 100644 --- a/src/if_python.c +++ b/src/if_python.c @@ -1073,17 +1073,13 @@ BufferGetattr(PyObject *self, char *name) static PyInt BufferAssItem(PyObject *self, PyInt n, PyObject *val) { - return RBAsItem((BufferObject *)(self), n, val, 1, - (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count, - NULL); + return RBAsItem((BufferObject *)(self), n, val, 1, -1, NULL); } static PyInt BufferAssSlice(PyObject *self, PyInt lo, PyInt hi, PyObject *val) { - return RBAsSlice((BufferObject *)(self), lo, hi, val, 1, - (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count, - NULL); + return RBAsSlice((BufferObject *)(self), lo, hi, val, 1, -1, NULL); } static PySequenceMethods RangeAsSeq = { |