summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormvglasow <michael -at- vonglasow.com>2018-09-28 23:37:10 +0300
committermvglasow <michael -at- vonglasow.com>2018-09-29 01:37:12 +0300
commitb6c71a9ff9042e45d8acaa0ea08db6e0177bcf77 (patch)
tree6e745dca88d3ff70c9793b5fb00c4a81938bb5f6
parenta9cc07a4255dcfe5f7b75d318a7ec54f4d07afe8 (diff)
downloadnavit-b6c71a9ff9042e45d8acaa0ea08db6e0177bcf77.tar.gz
Fix:route:Insert candidate end points with correct key
Signed-off-by: mvglasow <michael -at- vonglasow.com>
-rw-r--r--navit/route.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/navit/route.c b/navit/route.c
index aa82d5f03..1100ac31b 100644
--- a/navit/route.c
+++ b/navit/route.c
@@ -1412,7 +1412,7 @@ static void route_graph_init(struct route_graph *this, struct route_info *dst, s
s->end->seg = s;
s->end->rhs = val;
s->end->dst_val = val;
- s->end->el = fh_insertkey(this->heap, s->end->value, s->end);
+ s->end->el = fh_insertkey(this->heap, MIN(s->end->rhs, s->end->value), s->end);
}
val = route_value_seg(profile, NULL, s, 1);
if (val != INT_MAX) {
@@ -1420,7 +1420,7 @@ static void route_graph_init(struct route_graph *this, struct route_info *dst, s
s->start->seg = s;
s->start->rhs = val;
s->start->dst_val = val;
- s->start->el = fh_insertkey(this->heap, s->start->value, s->start);
+ s->start->el = fh_insertkey(this->heap, MIN(s->start->rhs, s->start->value), s->start);
}
}
}