Fix:core:return the correct size for attr_type_item class attributes, needed for...
authortegzed <tegzed@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sat, 19 Mar 2011 22:33:59 +0000 (22:33 +0000)
committertegzed <tegzed@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sat, 19 Mar 2011 22:33:59 +0000 (22:33 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4372 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/attr.c

index 37de183..5ece0b1 100644 (file)
@@ -499,6 +499,8 @@ attr_data_size(struct attr *attr)
                return sizeof(*attr->u.color);
        if (attr->type >= attr_type_object_begin && attr->type <= attr_type_object_end) 
                return sizeof(void *);
+       if (attr->type >= attr_type_item_begin && attr->type <= attr_type_item_end) 
+               return sizeof(struct item);
        if (attr->type >= attr_type_int64_begin && attr->type <= attr_type_int64_end) 
                return sizeof(*attr->u.num64);
        if (attr->type == attr_order)