Fix reading past bounds removing from color ramp

This commit is contained in:
Campbell Barton 2017-05-05 07:41:12 +10:00
parent 97caad858f
commit 57bcc19bb3
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}