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-08-04 07:45:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-08-04 07:45:30 +0400
commit93f5e2218a5103e91ff4c3943aec3bc3d6f9c69e (patch)
tree023faff5996a38655b1cab90396469be00e733cd /source/gameengine
parent4bd60205fbdd7935fdda8f2d6f75e6ce3eb17c8f (diff)
code cleanup: replace strncpy -> BLI_strncpy, skip first 2 chars when making a hash from the object name.
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/Converter/KX_BlenderSceneConverter.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_NavMeshObject.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
index 7a53144657d..98af99825e1 100644
--- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
+++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
@@ -1143,7 +1143,7 @@ KX_LibLoadStatus *KX_BlenderSceneConverter::LinkBlendFile(BlendHandle *bpy_openl
/* needed for lookups*/
GetMainDynamic().push_back(main_newlib);
- strncpy(main_newlib->name, path, sizeof(main_newlib->name));
+ BLI_strncpy(main_newlib->name, path, sizeof(main_newlib->name));
status = new KX_LibLoadStatus(this, m_ketsjiEngine, scene_merge, path);
diff --git a/source/gameengine/Ketsji/KX_NavMeshObject.cpp b/source/gameengine/Ketsji/KX_NavMeshObject.cpp
index bf9c6ddb442..e45346db9c7 100644
--- a/source/gameengine/Ketsji/KX_NavMeshObject.cpp
+++ b/source/gameengine/Ketsji/KX_NavMeshObject.cpp
@@ -49,7 +49,7 @@ extern "C" {
#include "DetourStatNavMeshBuilder.h"
#include "KX_ObstacleSimulation.h"
-static const int MAX_PATH_LEN = 256;
+#define MAX_PATH_LEN 256
static const float polyPickExt[3] = {2, 4, 2};
static void calcMeshBounds(const float* vert, int nverts, float* bmin, float* bmax)
@@ -214,7 +214,7 @@ bool KX_NavMeshObject::BuildVertIndArrays(float *&vertices, int& nverts,
}
}
- MEM_freeN(allVerts);
+ MEM_SAFE_FREE(allVerts);
}
else
{