diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-02-04 19:48:29 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-02-04 19:48:29 +0400 |
commit | 1c1fb24f312464c0642fbc86db223c4f7dbe4c54 (patch) | |
tree | 4e0d0640c16fbea9eab6cec57ac6fe38cd116886 /source/blender | |
parent | 42bbd7d62edd64d3622b2a8491d5d245162f3497 (diff) |
fix for rangefunc being unused for int & int array.
also cast strlen to an int to avoid overflow.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/imbuf/intern/colormanagement.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_define.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c index 86f47fe07c4..8cb721e84f1 100644 --- a/source/blender/imbuf/intern/colormanagement.c +++ b/source/blender/imbuf/intern/colormanagement.c @@ -2110,7 +2110,7 @@ static void colormanage_description_strip(char *description) { 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')) { description[i] = '\0'; } diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 4e6c3748230..8bed562cbf7 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -2120,6 +2120,7 @@ void RNA_def_property_int_funcs_runtime(PropertyRNA *prop, IntPropertyGetFunc ge if (getfunc) iprop->get_ex = getfunc; if (setfunc) iprop->set_ex = setfunc; + if (rangefunc) iprop->range_ex = rangefunc; if (getfunc || setfunc) { /* 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 (setfunc) iprop->setarray_ex = setfunc; + if (rangefunc) iprop->range_ex = rangefunc; if (getfunc || setfunc) { /* don't save in id properties */ |