Fix:Core:Fixed direction of final route segment
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 3 Nov 2008 15:49:01 +0000 (15:49 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 3 Nov 2008 15:49:01 +0000 (15:49 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1629 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/route.c

index ec3fd29..9368660 100644 (file)
@@ -1571,9 +1571,9 @@ route_path_new(struct route_graph *this, struct route_path *oldpath, struct rout
        dbg(1,"start->value=%d 0x%x,0x%x\n", start->value, start->c.x, start->c.y);
        dbg(1,"dst sd->flags=%d sd->c[0]=0x%x,0x%x sd->c[sd->count-1]=0x%x,0x%x\n", sd->flags, sd->c[0].x,sd->c[0].y, sd->c[sd->count-1].x, sd->c[sd->count-1].y);
        if (start->c.x == sd->c[0].x && start->c.y == sd->c[0].y) { /* Adding a final segment to reach the destination within the destination street */
-               route_path_add_item(ret, &sd->item, dst->lenneg, &dst->lp, sd->c, dst->pos+1, NULL, -1);
+               route_path_add_item(ret, &sd->item, dst->lenneg, NULL, sd->c, dst->pos+1, &dst->lp, 1);
        } else if (start->c.x == sd->c[sd->count-1].x && start->c.y == sd->c[sd->count-1].y) {
-               route_path_add_item(ret, &sd->item, dst->lenpos, &dst->lp, sd->c+dst->pos+1, sd->count-dst->pos-1, NULL, 1);
+               route_path_add_item(ret, &sd->item, dst->lenpos, NULL, sd->c+dst->pos+1, sd->count-dst->pos-1, &dst->lp, -1);
        } else {
                printf("no route found\n");
                route_path_destroy(ret);