summaryrefslogtreecommitdiff
path: root/navit/route.c
diff options
context:
space:
mode:
authortinloaf <tinloaf@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-12-15 18:23:10 +0000
committertinloaf <tinloaf@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-12-15 18:23:10 +0000
commite73ccd805e18f6cc9c193828fcebab5c90ec1e61 (patch)
tree77448311b900763cadc31be6d301a60c9c540dfc /navit/route.c
parent611929a555d9d2933bab38306a6cc880d8e9c6ca (diff)
downloadnavit-e73ccd805e18f6cc9c193828fcebab5c90ec1e61.tar.gz
Fix:Core:Prevent duplicate segments in the route graph
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@1797 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/route.c')
-rw-r--r--navit/route.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/navit/route.c b/navit/route.c
index ac7b0ac1d..fa6b9d534 100644
--- a/navit/route.c
+++ b/navit/route.c
@@ -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__);