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>2012-01-11 16:33:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-11 16:33:51 +0400
commite10fd04db0bdcdbc326fce6cddc8af1179a5de5c (patch)
treea8f3a08b35101e30a0e5d4d1a94e0b2ef50c7122 /source/blender/blenkernel/intern/ipo.c
parentdcef7346eb3f16c27b3f952b6452396e66f5e996 (diff)
use BLI_strncpy and BLI_snprintf when the size of the string is known.
fix for sequencer unique naming which was missed with string length update.
Diffstat (limited to 'source/blender/blenkernel/intern/ipo.c')
-rw-r--r--source/blender/blenkernel/intern/ipo.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index 9890a2629fc..40fe3626848 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -328,9 +328,9 @@ static char *shapekey_adrcodes_to_paths (int adrcode, int *UNUSED(array_index))
/* block will be attached to ID_KE block, and setting that we alter is the 'value' (which sets keyblock.curval) */
// XXX adrcode 0 was dummy 'speed' curve
if (adrcode == 0)
- sprintf(buf, "speed");
+ strcpy(buf, "speed");
else
- sprintf(buf, "key_blocks[%d].value", adrcode);
+ BLI_snprintf(buf, sizeof(buf), "key_blocks[%d].value", adrcode);
return buf;
}
@@ -915,7 +915,7 @@ static char *get_rna_access (int blocktype, int adrcode, char actname[], char co
/* note, strings are not escapted and they should be! */
if ((actname && actname[0]) && (constname && constname[0])) {
/* Constraint in Pose-Channel */
- sprintf(buf, "pose.bones[\"%s\"].constraints[\"%s\"]", actname, constname);
+ BLI_snprintf(buf, sizeof(buf), "pose.bones[\"%s\"].constraints[\"%s\"]", actname, constname);
}
else if (actname && actname[0]) {
if ((blocktype == ID_OB) && strcmp(actname, "Object")==0) {
@@ -928,16 +928,16 @@ static char *get_rna_access (int blocktype, int adrcode, char actname[], char co
}
else {
/* Pose-Channel */
- sprintf(buf, "pose.bones[\"%s\"]", actname);
+ BLI_snprintf(buf, sizeof(buf), "pose.bones[\"%s\"]", actname);
}
}
else if (constname && constname[0]) {
/* Constraint in Object */
- sprintf(buf, "constraints[\"%s\"]", constname);
+ BLI_snprintf(buf, sizeof(buf), "constraints[\"%s\"]", constname);
}
else if (seq) {
/* Sequence names in Scene */
- sprintf(buf, "sequence_editor.sequences_all[\"%s\"]", seq->name+2);
+ BLI_snprintf(buf, sizeof(buf), "sequence_editor.sequences_all[\"%s\"]", seq->name+2);
}
else {
buf[0]= '\0'; /* empty string */
@@ -954,7 +954,7 @@ static char *get_rna_access (int blocktype, int adrcode, char actname[], char co
/* if there was no array index pointer provided, add it to the path */
if (array_index == NULL) {
- sprintf(buf, "[\"%d\"]", dummy_index);
+ BLI_snprintf(buf, sizeof(buf), "[\"%d\"]", dummy_index);
BLI_dynstr_append(path, buf);
}