[Bf-blender-cvs] [57bcc19bb38] master: Fix reading past bounds removing from color ramp
Campbell Barton
noreply at git.blender.org
Thu May 4 23:41:54 CEST 2017
Commit: 57bcc19bb389e682d14032398138966329deb52a
Author: Campbell Barton
Date: Fri May 5 07:41:12 2017 +1000
Branches: master
https://developer.blender.org/rB57bcc19bb389e682d14032398138966329deb52a
Fix reading past bounds removing from color ramp
===================================================================
M source/blender/blenkernel/intern/texture.c
===================================================================
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index 60990c03b0e..ba04dd9b8f4 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -549,11 +549,11 @@ int colorband_element_remove(struct ColorBand *coba, int index)
if (index < 0 || index >= coba->tot)
return 0;
+ coba->tot--;
for (a = index; a < coba->tot; a++) {
coba->data[a] = coba->data[a + 1];
}
if (coba->cur) coba->cur--;
- coba->tot--;
return 1;
}
More information about the Bf-blender-cvs
mailing list