Fix:Core:Prevent duplicate segments in the route graph
authortinloaf <tinloaf@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 15 Dec 2008 18:23:10 +0000 (18:23 +0000)
committertinloaf <tinloaf@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 15 Dec 2008 18:23:10 +0000 (18:23 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1797 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/route.c

index ac7b0ac..fa6b9d5 100644 (file)
@@ -847,17 +847,14 @@ route_graph_add_segment(struct route_graph *this, struct route_graph_point *star
                        int flags, int offset)
 {
        struct route_graph_segment *s;
-/*     
-       FIXME: commented out becouse
-       it is possible to have one item with two different
-       offsets as segments 
+
        s=start->start;
        while (s) {
-               if (item_is_equal(*item, s->item)) 
+               if (item_is_equal(*item, s->item) && (s->offset == offset)
                        return;
                s=s->start_next;
        } 
-*/
+
        s = g_new0(struct route_graph_segment, 1);
        if (!s) {
                printf("%s:Out of memory\n", __FUNCTION__);