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.
This commit is contained in:
2011-09-26 18:51:10 +00:00
parent e897c8e83e
commit 58587a3881
30 changed files with 79 additions and 68 deletions

View File

@@ -40,6 +40,7 @@
#include "DNA_object_types.h"
#include "BLI_utildefines.h"
#include "BLI_string.h"
#include "BKE_cdderivedmesh.h"
@@ -57,7 +58,7 @@ static void copyData(ModifierData *md, ModifierData *target)
LatticeModifierData *tlmd = (LatticeModifierData*) target;
tlmd->object = lmd->object;
strncpy(tlmd->name, lmd->name, 32);
BLI_strncpy(tlmd->name, lmd->name, 32);
}
static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)