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_customdata.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_customdata.c')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_types_customdata.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c index e45a39a0643..2a9592d21e2 100644 --- a/source/blender/python/bmesh/bmesh_py_types_customdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c @@ -685,7 +685,7 @@ static PyObject *bpy_bmlayercollection_subscript(BPy_BMLayerCollection *self, Py /* only get the length for negative values */ Py_ssize_t len = bpy_bmlayercollection_length(self); if (start < 0) start += len; - if (stop < 0) start += len; + if (stop < 0) stop += len; } if (stop - start <= 0) { |