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_hook.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_hook.c')
-rw-r--r--source/blender/modifiers/intern/MOD_hook.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_hook.c b/source/blender/modifiers/intern/MOD_hook.c
index 785abc7d4d1..ad97ee82ee2 100644
--- a/source/blender/modifiers/intern/MOD_hook.c
+++ b/source/blender/modifiers/intern/MOD_hook.c
@@ -41,6 +41,7 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
+#include "BLI_string.h"
#include "BKE_action.h"
#include "BKE_cdderivedmesh.h"
@@ -72,8 +73,8 @@ static void copyData(ModifierData *md, ModifierData *target)
thmd->totindex = hmd->totindex;
thmd->indexar = MEM_dupallocN(hmd->indexar);
memcpy(thmd->parentinv, hmd->parentinv, sizeof(hmd->parentinv));
- strncpy(thmd->name, hmd->name, 32);
- strncpy(thmd->subtarget, hmd->subtarget, 32);
+ BLI_strncpy(thmd->name, hmd->name, 32);
+ BLI_strncpy(thmd->subtarget, hmd->subtarget, 32);
}
static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)