Merging r40572 through r40597 from trunk into soc-2011-tomato
[blender.git] / source / blender / blenkernel / intern / blender.c
index d1f9b10..31a76b5 100644 (file)
@@ -520,7 +520,7 @@ void BKE_write_undo(bContext *C, const char *name)
        
        /* make new */
        curundo= uel= MEM_callocN(sizeof(UndoElem), "undo file");
-       strncpy(uel->name, name, MAXUNDONAME-1);
+       BLI_strncpy(uel->name, name, sizeof(uel->name));
        BLI_addtail(&undobase, uel);
        
        /* and limit amount to the maximum */