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>2008-10-19 08:02:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-10-19 08:02:37 +0400
commit42e287af1cc3ed2f37630f6f62c82c2d8ccc66b3 (patch)
tree6e05ba42d1aa9cd9d028a8a169675a4dcfb1aa08 /source/blender
parent72e5ede546cd5b17e4dec2f5b9949a9a58c3f7b5 (diff)
source/blender/blenloader/intern/readfile.c - use memmove rather then strncpy for overlapping strings.
source/blender/blenlib/intern/fileops.c - zero length strings would check for a slash before the strings first char. source/gameengine/GameLogic/SCA_JoystickSensor.cpp - m_istrig_prev was not initialized source/blender/src/editmesh.c - active face pointer was not set to NULL in free_editMesh()
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenlib/intern/fileops.c4
-rw-r--r--source/blender/blenloader/intern/readfile.c2
-rw-r--r--source/blender/src/editmesh.c1
3 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index 76437720e45..ebd8f4be1cf 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -95,12 +95,12 @@ char *BLI_last_slash(const char *string) {
void BLI_add_slash(char *string) {
int len = strlen(string);
#ifdef WIN32
- if (string[len-1]!='\\') {
+ if (len==0 || string[len-1]!='\\') {
string[len] = '\\';
string[len+1] = '\0';
}
#else
- if (string[len-1]!='/') {
+ if (len==0 || string[len-1]!='/') {
string[len] = '/';
string[len+1] = '\0';
}
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 0193acb9f98..c2dcc86ae41 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -7924,7 +7924,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
bMessageActuator *msgAct = (bMessageActuator *) act->data;
if (strlen(msgAct->toPropName) > 2) {
/* strip first 2 chars, would have only worked if these were OB anyway */
- strncpy(msgAct->toPropName, msgAct->toPropName+2, sizeof(msgAct->toPropName));
+ memmove( msgAct->toPropName, msgAct->toPropName+2, sizeof(msgAct->toPropName)-2 );
} else {
msgAct->toPropName[0] = '\0';
}
diff --git a/source/blender/src/editmesh.c b/source/blender/src/editmesh.c
index e96c3f6d40f..a573ea85ca8 100644
--- a/source/blender/src/editmesh.c
+++ b/source/blender/src/editmesh.c
@@ -633,6 +633,7 @@ void free_editMesh(EditMesh *em)
if(em->retopo_paint_data) retopo_free_paint_data(em->retopo_paint_data);
em->retopo_paint_data= NULL;
+ em->act_face = NULL;
}
/* on G.editMesh */