diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-04 10:06:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-04 10:06:14 +0300 |
commit | 5b643018348280ee601a20fb9329d5a313c23446 (patch) | |
tree | b2bb37028ac88a655aea37bb7a8b850b84885cea /source/blender/python/generic/bgl.c | |
parent | f6743fcaa4fbccd4bd8a92c44a3cd4bd2d153fd1 (diff) | |
parent | 2d3d76693a84224b86eac50729fb5a321753b7e3 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/python/generic/bgl.c')
-rw-r--r-- | source/blender/python/generic/bgl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c index 1e2837799e3..8f9475822bf 100644 --- a/source/blender/python/generic/bgl.c +++ b/source/blender/python/generic/bgl.c @@ -866,7 +866,7 @@ static PyObject *Buffer_slice(Buffer *self, int begin, int end) { PyObject *list; int count; - + if (begin < 0) begin = 0; if (end > self->dimensions[0]) end = self->dimensions[0]; if (begin > end) begin = end; @@ -914,11 +914,11 @@ static int Buffer_ass_slice(Buffer *self, int begin, int end, PyObject *seq) { PyObject *item; int count, err = 0; - + if (begin < 0) begin = 0; if (end > self->dimensions[0]) end = self->dimensions[0]; if (begin > end) begin = end; - + if (!PySequence_Check(seq)) { PyErr_Format(PyExc_TypeError, "buffer[:] = value, invalid assignment. " @@ -934,7 +934,7 @@ static int Buffer_ass_slice(Buffer *self, int begin, int end, PyObject *seq) "Expected: %d (given: %d)", count, end - begin); return -1; } - + for (count = begin; count < end; count++) { item = PySequence_GetItem(seq, count - begin); if (item) { |