diff options
-rw-r--r-- | source/blender/blenlib/intern/fileops.c | 4 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 2 | ||||
-rw-r--r-- | source/blender/src/editmesh.c | 1 | ||||
-rw-r--r-- | source/gameengine/GameLogic/SCA_JoystickSensor.cpp | 1 |
4 files changed, 5 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 */ diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp index d0dc875da0b..8b96840b149 100644 --- a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp +++ b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp @@ -74,6 +74,7 @@ std::cout << " hat flag " << m_hatf << std::endl; void SCA_JoystickSensor::Init() { m_istrig=(m_invert)?1:0; + m_istrig_prev=0; m_reset = true; } |