[Bf-blender-cvs] [fab16ef] fracture_modifier: windows crash fix: material name had incorrect length

Martin Felke noreply at git.blender.org
Wed Dec 17 21:01:03 CET 2014


Commit: fab16ef5d68ade732edd89d430781483fb59a364
Author: Martin Felke
Date:   Wed Dec 17 21:00:28 2014 +0100
Branches: fracture_modifier
https://developer.blender.org/rBfab16ef5d68ade732edd89d430781483fb59a364

windows crash fix: material name had incorrect length

===================================================================

M	source/blender/modifiers/intern/MOD_fracture.c

===================================================================

diff --git a/source/blender/modifiers/intern/MOD_fracture.c b/source/blender/modifiers/intern/MOD_fracture.c
index efd53f8..dec093f 100644
--- a/source/blender/modifiers/intern/MOD_fracture.c
+++ b/source/blender/modifiers/intern/MOD_fracture.c
@@ -950,7 +950,7 @@ static void do_fracture(FractureModifierData *fracmd, ShardID id, Object *obj, D
 
 			short* totmat = give_totcolp(obj);
 
-			BLI_strncpy(name, obj->id.name + 2, strlen(obj->id.name) - 1);
+			BLI_strncpy(name, obj->id.name + 2, strlen(obj->id.name));
 			if (*totmat == 0)
 			{
 				/*create both materials*/




More information about the Bf-blender-cvs mailing list