diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-09-26 03:41:32 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-09-26 03:41:32 +0400 |
commit | 95002a98bfab3ccad94134fc8bbedab19cd0289f (patch) | |
tree | 0eecb647d8b40087c65f354648631d20d74ca24e /source/blender/python/bmesh/bmesh_py_types_select.c | |
parent | d08abbee694166429f67d59f6d86962b8d1bed4e (diff) |
fix for very bad bug with python list slicing which - in bmesh and bpy api for all? 2.5x + releases.
negative stop values when slicing was broken. eg.
bpy.data.objects[0:-2] != list(bpy.data.objects)[0:-2]
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_types_select.c')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_types_select.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types_select.c b/source/blender/python/bmesh/bmesh_py_types_select.c index c3adc8366bd..85095596a4e 100644 --- a/source/blender/python/bmesh/bmesh_py_types_select.c +++ b/source/blender/python/bmesh/bmesh_py_types_select.c @@ -280,7 +280,7 @@ static PyObject *bpy_bmeditselseq_subscript(BPy_BMEditSelSeq *self, PyObject *ke /* only get the length for negative values */ Py_ssize_t len = bpy_bmeditselseq_length(self); if (start < 0) start += len; - if (stop < 0) start += len; + if (stop < 0) stop += len; } if (stop - start <= 0) { |