discomfitor pushed a commit to branch efl-1.16.

http://git.enlightenment.org/core/efl.git/commit/?id=b692dcd444e97c3c3d0e81d698331d7693f6c83b

commit b692dcd444e97c3c3d0e81d698331d7693f6c83b
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Wed Dec 16 14:35:19 2015 -0500

    edje_cc: correctly copy part descriptions when setting part type
    
    in the case where a part is inherited, changing the type will lead to
    broken part/program lookups for the part during resolving in write-out;
    memcpy alone is not enough to fix this.
    
    @fix
---
 src/bin/edje/edje_cc_handlers.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 1c64173..dd48163 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -4913,8 +4913,13 @@ _part_type_set(unsigned int type)
         if (previous)
           {
              new = _edje_part_description_alloc(type, pc->part, ep->name);
-             memcpy(new, previous, sizeof (Edje_Part_Description_Common));
              eina_hash_add(desc_hash, &new, ep);
+             parent_desc = previous;
+             new->state.name = strdup(previous->state.name);
+             new->state.value = previous->state.value;
+             st_collections_group_parts_part_description_inherit();
+             parent_desc = NULL;
+             _part_desc_free(pc, ep, previous);
 
              ep->default_desc = new;
           }
@@ -4923,8 +4928,13 @@ _part_type_set(unsigned int type)
           {
              previous = ep->other.desc[i];
              new = _edje_part_description_alloc(type, pc->part, ep->name);
-             memcpy(new, previous, sizeof (Edje_Part_Description_Common));
              eina_hash_add(desc_hash, &new, ep);
+             parent_desc = previous;
+             new->state.name = strdup(previous->state.name);
+             new->state.value = previous->state.value;
+             st_collections_group_parts_part_description_inherit();
+             parent_desc = NULL;
+             _part_desc_free(pc, ep, previous);
              ep->other.desc[i] = new;
           }
      }

-- 


Reply via email to