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-07-15 02:08:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-15 02:08:56 +0400
commit9c8516703d24aa5e3f67d563c8f5dfd54592dc1d (patch)
tree54c013ed6f92050acbaecc8ceab22a898bcfb288 /source/blender/editors/transform/transform_orientations.c
parent1c2ff55334c774cdcf0699387de6e450cef38e99 (diff)
replace strncpy with BLI_strncpy for cases we expect the string to be NULL terminated.
Diffstat (limited to 'source/blender/editors/transform/transform_orientations.c')
-rw-r--r--source/blender/editors/transform/transform_orientations.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 70e01ef3718..130e11d45aa 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -115,7 +115,7 @@ static TransformOrientation *createViewSpace(bContext *C, ReportList *UNUSED(rep
View3D *v3d = CTX_wm_view3d(C);
if (rv3d->persp == RV3D_CAMOB && v3d->camera) {
/* If an object is used as camera, then this space is the same as object space! */
- strncpy(name, v3d->camera->id.name + 2, MAX_NAME);
+ BLI_strncpy(name, v3d->camera->id.name + 2, MAX_NAME);
}
else {
strcpy(name, "Custom View");
@@ -141,7 +141,7 @@ static TransformOrientation *createObjectSpace(bContext *C, ReportList *UNUSED(r
/* use object name if no name is given */
if (name[0] == 0) {
- strncpy(name, ob->id.name + 2, MAX_ID_NAME - 2);
+ BLI_strncpy(name, ob->id.name + 2, MAX_ID_NAME - 2);
}
return addMatrixSpace(C, mat, name, overwrite);
@@ -306,7 +306,7 @@ TransformOrientation *addMatrixSpace(bContext *C, float mat[3][3], char name[],
if (ts == NULL) {
ts = MEM_callocN(sizeof(TransformOrientation), "UserTransSpace from matrix");
BLI_addtail(transform_spaces, ts);
- strncpy(ts->name, name, sizeof(ts->name));
+ BLI_strncpy(ts->name, name, sizeof(ts->name));
}
/* copy matrix into transform space */