forked from bartvdbraak/blender
fix for rangefunc being unused for int & int array.
also cast strlen to an int to avoid overflow.
This commit is contained in:
parent
42bbd7d62e
commit
1c1fb24f31
@ -2110,7 +2110,7 @@ static void colormanage_description_strip(char *description)
|
|||||||
{
|
{
|
||||||
int i, n;
|
int i, n;
|
||||||
|
|
||||||
for (i = strlen(description) - 1; i >= 0; i--) {
|
for (i = (int)strlen(description) - 1; i >= 0; i--) {
|
||||||
if (ELEM(description[i], '\r', '\n')) {
|
if (ELEM(description[i], '\r', '\n')) {
|
||||||
description[i] = '\0';
|
description[i] = '\0';
|
||||||
}
|
}
|
||||||
|
@ -2120,6 +2120,7 @@ void RNA_def_property_int_funcs_runtime(PropertyRNA *prop, IntPropertyGetFunc ge
|
|||||||
|
|
||||||
if (getfunc) iprop->get_ex = getfunc;
|
if (getfunc) iprop->get_ex = getfunc;
|
||||||
if (setfunc) iprop->set_ex = setfunc;
|
if (setfunc) iprop->set_ex = setfunc;
|
||||||
|
if (rangefunc) iprop->range_ex = rangefunc;
|
||||||
|
|
||||||
if (getfunc || setfunc) {
|
if (getfunc || setfunc) {
|
||||||
/* don't save in id properties */
|
/* don't save in id properties */
|
||||||
@ -2136,6 +2137,7 @@ void RNA_def_property_int_array_funcs_runtime(PropertyRNA *prop, IntArrayPropert
|
|||||||
|
|
||||||
if (getfunc) iprop->getarray_ex = getfunc;
|
if (getfunc) iprop->getarray_ex = getfunc;
|
||||||
if (setfunc) iprop->setarray_ex = setfunc;
|
if (setfunc) iprop->setarray_ex = setfunc;
|
||||||
|
if (rangefunc) iprop->range_ex = rangefunc;
|
||||||
|
|
||||||
if (getfunc || setfunc) {
|
if (getfunc || setfunc) {
|
||||||
/* don't save in id properties */
|
/* don't save in id properties */
|
||||||
|
Loading…
Reference in New Issue
Block a user