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>2013-12-03 02:12:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-12-03 02:12:44 +0400
commit1cee3e53fc9e5d056c3b5f37d3ec19105a0cfeed (patch)
treef3da30c78391559be371621fe1e955fc3c5a4255 /source/blender/editors/transform/transform_orientations.c
parenta169a109e5636699fd11915d06257cf26105a105 (diff)
Code Cleanup: use BLI_strncpy when copying into fixed sized buffers
Diffstat (limited to 'source/blender/editors/transform/transform_orientations.c')
-rw-r--r--source/blender/editors/transform/transform_orientations.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 6dc685c0148..be8bc460764 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -458,25 +458,25 @@ void initTransformOrientation(bContext *C, TransInfo *t)
switch (t->current_orientation) {
case V3D_MANIP_GLOBAL:
unit_m3(t->spacemtx);
- strcpy(t->spacename, IFACE_("global"));
+ BLI_strncpy(t->spacename, IFACE_("global"), sizeof(t->spacename));
break;
case V3D_MANIP_GIMBAL:
unit_m3(t->spacemtx);
if (gimbal_axis(ob, t->spacemtx)) {
- strcpy(t->spacename, IFACE_("gimbal"));
+ BLI_strncpy(t->spacename, IFACE_("gimbal"), sizeof(t->spacename));
break;
}
/* fall-through */ /* no gimbal fallthrough to normal */
case V3D_MANIP_NORMAL:
if (obedit || (ob && ob->mode & OB_MODE_POSE)) {
- strcpy(t->spacename, IFACE_("normal"));
+ BLI_strncpy(t->spacename, IFACE_("normal"), sizeof(t->spacename));
ED_getTransformOrientationMatrix(C, t->spacemtx, (v3d->around == V3D_ACTIVE));
break;
}
/* fall-through */ /* we define 'normal' as 'local' in Object mode */
case V3D_MANIP_LOCAL:
- strcpy(t->spacename, IFACE_("local"));
+ BLI_strncpy(t->spacename, IFACE_("local"), sizeof(t->spacename));
if (ob) {
copy_m3_m4(t->spacemtx, ob->obmat);
@@ -493,7 +493,7 @@ void initTransformOrientation(bContext *C, TransInfo *t)
RegionView3D *rv3d = t->ar->regiondata;
float mat[3][3];
- strcpy(t->spacename, IFACE_("view"));
+ BLI_strncpy(t->spacename, IFACE_("view"), sizeof(t->spacename));
copy_m3_m4(mat, rv3d->viewinv);
normalize_m3(mat);
copy_m3_m3(t->spacemtx, mat);