Fix:Core:Fixed recently introduced bug
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 6 Jul 2008 20:19:08 +0000 (20:19 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 6 Jul 2008 20:19:08 +0000 (20:19 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit@1202 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/route.c

index 739f070..608093b 100644 (file)
@@ -1760,12 +1760,12 @@ route_graph_map_new(struct map_methods *meth, struct attr **attrs)
 static struct map *
 route_get_map_helper(struct route *this_, struct map **map, char *type)
 {
-       struct attr type_attr={attr_type,{"route"}};
-       struct attr route_attr={attr_route,.u.route=this_};
-       struct attr data_attr={attr_data,{""}};
-       struct attr *attrs_route[]={&type_attr, &route_attr, &data_attr, NULL};
        if (! *map) 
-               *map=map_new(attrs_route);
+               *map=map_new((struct attr*[]){
+                                &(struct attr){attr_type,{type}},
+                                &(struct attr){attr_route,.u.route=this_},
+                                &(struct attr){attr_data,{""}},
+                                NULL});
        return *map;
 }