diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-06-12 21:30:21 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-06-12 21:30:21 +0400 |
commit | 971e4be1081fb655f80d6d4065c734ccf625c987 (patch) | |
tree | be6d53d9712d5c51ef5e34f707c92274991c7439 /source/blender/blenkernel/BKE_idprop.h | |
parent | c3c6fb2de28de350784db4730ed091da6b064198 (diff) |
modify my last commit to fix [#22486] add_actuator crashes when name is bigger than 32 chars
Throwing an exception if the strings too long means scripts need to be aware of string lengths and changing a string length in RNA can too easily break scripts.
Instead honor the string length in RNA_property_string_set()
Diffstat (limited to 'source/blender/blenkernel/BKE_idprop.h')
-rw-r--r-- | source/blender/blenkernel/BKE_idprop.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h index e33239293a8..0e0d76f4284 100644 --- a/source/blender/blenkernel/BKE_idprop.h +++ b/source/blender/blenkernel/BKE_idprop.h @@ -71,7 +71,8 @@ void IDP_FreeArray(struct IDProperty *prop); void IDP_UnlinkArray(struct IDProperty *prop); /* ---------- String Type ------------ */ -void IDP_AssignString(struct IDProperty *prop, char *st); +IDProperty *IDP_NewString(const char *st, const char *name, int maxlen);/* maxlen excludes '\0' */ +void IDP_AssignString(struct IDProperty *prop, char *st, int maxlen); /* maxlen excludes '\0' */ void IDP_ConcatStringC(struct IDProperty *prop, char *st); void IDP_ConcatString(struct IDProperty *str1, struct IDProperty *append); void IDP_FreeString(struct IDProperty *prop); |