diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-14 06:48:56 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-14 06:48:56 +0400 |
commit | 289f627f6335a1c9d2aabf17bfc11ceb8ce97c37 (patch) | |
tree | 5cc5b6f367aa368fe50f88d924c3394be0461e38 | |
parent | c8a1ef78c098d3aafbd205c28ed57408e83adbea (diff) |
code cleanup: when extending name length Key.elemstr was incorrectly extended to 64 chars, added comment and set back to original length.
-rw-r--r-- | source/blender/blenkernel/intern/key.c | 8 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_key_types.h | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index 2914585ad10..fd6d9a9aed0 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -69,7 +69,7 @@ #define KEY_MODE_BPOINT 1 #define KEY_MODE_BEZTRIPLE 2 -// old defines from DNA_ipo_types.h for data-type +/* old defines from DNA_ipo_types.h for data-type, stored in DNA - don't modify! */ #define IPO_FLOAT 4 #define IPO_BEZTRIPLE 100 #define IPO_BPOINT 101 @@ -660,7 +660,7 @@ static void cp_key(const int start, int end, const int tot, char *poin, Key *key return; } - poin += ofsp[0]; + poin += *ofsp; cp += 2; ofsp++; } @@ -796,7 +796,7 @@ void do_rel_key(const int start, int end, const int tot, char *basispoin, Key *k return; } - poin += ofsp[0]; + poin += *ofsp; cp += 2; ofsp++; @@ -963,7 +963,7 @@ static void do_key(const int start, int end, const int tot, char *poin, Key *key return; } - poin += ofsp[0]; + poin += *ofsp; cp += 2; ofsp++; } diff --git a/source/blender/makesdna/DNA_key_types.h b/source/blender/makesdna/DNA_key_types.h index 26c42e402a3..e07fe6663ca 100644 --- a/source/blender/makesdna/DNA_key_types.h +++ b/source/blender/makesdna/DNA_key_types.h @@ -61,7 +61,10 @@ typedef struct Key { struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ KeyBlock *refkey; - char elemstr[64]; /* MAX_NAME */ + /* this is not a regular string, although it is \0 terminated + * this is an array of (element_array_size, element_type) pairs + * (each one char) used for calculating shape key-blocks */ + char elemstr[32]; int elemsize; float curval DNA_DEPRECATED; |