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-26 22:51:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-26 22:51:10 +0400
commit58587a38818b0dba25886c97d584285fef4e9249 (patch)
tree38e00681d39ee6a0f588232c9ef70ec5f80e22df /source/blender/modifiers/intern/MOD_armature.c
parente897c8e83e1277767d9a44cb0ecb6f8a279dddc3 (diff)
replace strncpy with BLI_strncpy, in some cases strncpy was being misused since it doesnt ensure \0 termination.
also dont call CTX_data_scene() twice when checking for function arguments.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_armature.c')
-rw-r--r--source/blender/modifiers/intern/MOD_armature.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_armature.c b/source/blender/modifiers/intern/MOD_armature.c
index 0b46d950950..0ef85a49899 100644
--- a/source/blender/modifiers/intern/MOD_armature.c
+++ b/source/blender/modifiers/intern/MOD_armature.c
@@ -42,6 +42,7 @@
#include "DNA_mesh_types.h"
#include "BLI_utildefines.h"
+#include "BLI_string.h"
#include "BKE_cdderivedmesh.h"
@@ -70,7 +71,7 @@ static void copyData(ModifierData *md, ModifierData *target)
tamd->object = amd->object;
tamd->deformflag = amd->deformflag;
tamd->multi = amd->multi;
- strncpy(tamd->defgrp_name, amd->defgrp_name, 32);
+ BLI_strncpy(tamd->defgrp_name, amd->defgrp_name, 32);
}
static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *UNUSED(md))