Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-04-04 18:33:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-04-04 18:33:41 +0400
commit97454d7b85e2be0259318e73a8d4ec662eb75985 (patch)
tree5740303bab516ac57c9b49545a4e6f869273908c /source/blender/makesrna/intern/rna_key.c
parentcddd6a56dd55c811bed08249d64d6797e62068ec (diff)
no functional changes. use sizeof() and MAXFRAME
Diffstat (limited to 'source/blender/makesrna/intern/rna_key.c')
-rw-r--r--source/blender/makesrna/intern/rna_key.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index 47accb86d8f..7e9aebeffa4 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -64,10 +64,10 @@ static Key *rna_ShapeKey_find_key(ID *id)
void rna_ShapeKey_name_set(PointerRNA *ptr, const char *value)
{
KeyBlock *kb= ptr->data;
- char oldname[32];
+ char oldname[sizeof(kb->name)];
/* make a copy of the old name first */
- BLI_strncpy(oldname, kb->name, sizeof(oldname));
+ BLI_strncpy(oldname, kb->name, sizeof(kb->name));
/* copy the new name into the name slot */
BLI_strncpy(kb->name, value, sizeof(kb->name));
@@ -75,7 +75,7 @@ void rna_ShapeKey_name_set(PointerRNA *ptr, const char *value)
/* make sure the name is truly unique */
if (ptr->id.data) {
Key *key= rna_ShapeKey_find_key(ptr->id.data);
- BLI_uniquename(&key->block, kb, "Key", '.', offsetof(KeyBlock, name), 32);
+ BLI_uniquename(&key->block, kb, "Key", '.', offsetof(KeyBlock, name), sizeof(kb->name));
}
/* fix all the animation data which may link to this */