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>2011-03-05 13:37:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-05 13:37:59 +0300
commit2610881e9c6d15c403c3b923650569fb87258264 (patch)
tree74880bf0266dd2c3aa590a517701e282b33be46b /source/blender/editors/sculpt_paint/sculpt_undo.c
parentc7fccc84bf59bed95bdf13207c40f7a1d1711d24 (diff)
sculpt undo struct was using an array of char pointers rather then a char array.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_undo.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index 2ddb635a284..4e62c66c425 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -100,17 +100,15 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb)
continue;
if(unode->maxvert) {
- char *shapeName= (char*)unode->shapeName;
-
/* regular mesh restore */
if(ss->totvert != unode->maxvert)
continue;
- if (ss->kb && strcmp(ss->kb->name, shapeName)) {
+ if (ss->kb && strcmp(ss->kb->name, unode->shapeName)) {
/* shape key has been changed before calling undo operator */
Key *key= ob_get_key(ob);
- KeyBlock *kb= key_get_named_keyblock(key, shapeName);
+ KeyBlock *kb= key_get_named_keyblock(key, unode->shapeName);
if (kb) {
ob->shapenr= BLI_findindex(&key->block, kb) + 1;
@@ -316,7 +314,7 @@ SculptUndoNode *sculpt_undo_push_node(SculptSession *ss, PBVHNode *node)
memcpy(unode->grids, grids, sizeof(int)*totgrid);
/* store active shape key */
- if(ss->kb) BLI_strncpy((char*)unode->shapeName, ss->kb->name, sizeof(ss->kb->name));
+ if(ss->kb) BLI_strncpy(unode->shapeName, ss->kb->name, sizeof(ss->kb->name));
else unode->shapeName[0]= '\0';
return unode;