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/editors/curve
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/editors/curve')
-rw-r--r--source/blender/editors/curve/editcurve.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 762564c1cc9..85ddc7ef14e 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -1069,17 +1069,17 @@ static void curve_rename_fcurves(Object *obedit, ListBase *orig_curves)
while (a--) {
keyIndex= getCVKeyIndex(editnurb, bezt);
if(keyIndex) {
- sprintf(rna_path, "splines[%d].bezier_points[%d]", nu_index, pt_index);
- sprintf(orig_rna_path, "splines[%d].bezier_points[%d]", keyIndex->nu_index, keyIndex->pt_index);
+ BLI_snprintf(rna_path, sizeof(rna_path), "splines[%d].bezier_points[%d]", nu_index, pt_index);
+ BLI_snprintf(orig_rna_path, sizeof(orig_rna_path), "splines[%d].bezier_points[%d]", keyIndex->nu_index, keyIndex->pt_index);
if(keyIndex->switched) {
char handle_path[64], orig_handle_path[64];
- sprintf(orig_handle_path, "%s.handle_left", orig_rna_path);
- sprintf(handle_path, "%s.handle_right", rna_path);
+ BLI_snprintf(orig_handle_path, sizeof(orig_rna_path), "%s.handle_left", orig_rna_path);
+ BLI_snprintf(handle_path, sizeof(rna_path), "%s.handle_right", rna_path);
fcurve_path_rename(ad, orig_handle_path, handle_path, orig_curves, &curves);
- sprintf(orig_handle_path, "%s.handle_right", orig_rna_path);
- sprintf(handle_path, "%s.handle_left", rna_path);
+ BLI_snprintf(orig_handle_path, sizeof(orig_rna_path), "%s.handle_right", orig_rna_path);
+ BLI_snprintf(handle_path, sizeof(rna_path), "%s.handle_left", rna_path);
fcurve_path_rename(ad, orig_handle_path, handle_path, orig_curves, &curves);
}
@@ -1100,8 +1100,8 @@ static void curve_rename_fcurves(Object *obedit, ListBase *orig_curves)
while (a--) {
keyIndex= getCVKeyIndex(editnurb, bp);
if(keyIndex) {
- sprintf(rna_path, "splines[%d].points[%d]", nu_index, pt_index);
- sprintf(orig_rna_path, "splines[%d].points[%d]", keyIndex->nu_index, keyIndex->pt_index);
+ BLI_snprintf(rna_path, sizeof(rna_path), "splines[%d].points[%d]", nu_index, pt_index);
+ BLI_snprintf(orig_rna_path, sizeof(orig_rna_path), "splines[%d].points[%d]", keyIndex->nu_index, keyIndex->pt_index);
fcurve_path_rename(ad, orig_rna_path, rna_path, orig_curves, &curves);
keyIndex->nu_index= nu_index;
@@ -1140,8 +1140,8 @@ static void curve_rename_fcurves(Object *obedit, ListBase *orig_curves)
}
if(keyIndex) {
- sprintf(rna_path, "splines[%d]", nu_index);
- sprintf(orig_rna_path, "splines[%d]", keyIndex->nu_index);
+ BLI_snprintf(rna_path, sizeof(rna_path), "splines[%d]", nu_index);
+ BLI_snprintf(orig_rna_path, sizeof(orig_rna_path), "splines[%d]", keyIndex->nu_index);
fcurve_path_rename(ad, orig_rna_path, rna_path, orig_curves, &curves);
}