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>2011-09-15 16:26:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-15 16:26:48 +0400
commit0d355a8a2ccaeb54a1f723fd5adacec76d08c921 (patch)
treeff3b24f061960689c8fea73e074594f2603bf159 /source/blender/makesrna/intern/rna_pose.c
parent9648c6016b35a72aa23395f5d200e342df16490b (diff)
replace BLI_strncpy with BLI_strncpy_utf8 where input isnt ensured to be valid.
also replace strcpy's which copy using "" with str[0]='\0'
Diffstat (limited to 'source/blender/makesrna/intern/rna_pose.c')
-rw-r--r--source/blender/makesrna/intern/rna_pose.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 0dd8218d1b9..434634f6b10 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -222,7 +222,7 @@ static void rna_PoseChannel_name_set(PointerRNA *ptr, const char *value)
char oldname[sizeof(pchan->name)], newname[sizeof(pchan->name)];
/* need to be on the stack */
- BLI_strncpy(newname, value, sizeof(pchan->name));
+ BLI_strncpy_utf8(newname, value, sizeof(pchan->name));
BLI_strncpy(oldname, pchan->name, sizeof(pchan->name));
ED_armature_bone_rename(ob->data, oldname, newname);
@@ -411,7 +411,7 @@ static void rna_pose_bgroup_name_index_get(PointerRNA *ptr, char *value, int ind
grp= BLI_findlink(&pose->agroups, index-1);
if(grp) BLI_strncpy(value, grp->name, sizeof(grp->name));
- else BLI_strncpy(value, "", sizeof(grp->name)); // XXX if invalid pointer, won't this crash?
+ else value[0]= '\0';
}
static int rna_pose_bgroup_name_index_length(PointerRNA *ptr, int index)
@@ -451,7 +451,7 @@ static void rna_pose_pgroup_name_set(PointerRNA *ptr, const char *value, char *r
}
}
- BLI_strncpy(result, "", maxlen);
+ result[0]= '\0';
}
#endif