From 0842bc0ca51dc2dbbb29b5345b46539754a5edb5 Mon Sep 17 00:00:00 2001 From: thorkill Date: Tue, 21 Jul 2015 19:39:08 +0200 Subject: [PATCH] Revert "Added missing check to e->to->prevedge" This reverts commit 4077acd583463919244181aa0ea0c36819ba8ac4. --- src/graph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graph.c b/src/graph.c index 15ed0554..836661fd 100644 --- a/src/graph.c +++ b/src/graph.c @@ -196,7 +196,7 @@ static void sssp_bfs(void) { // Only update nexthop if it doesn't increase the path length - if(!e->to->status.visited || (e->to->distance == n->distance + 1 && (e->to->prevedge && e->weight <= e->to->prevedge->weight))) + if(!e->to->status.visited || (e->to->distance == n->distance + 1 && e->weight <= e->to->prevedge->weight)) e->to->nexthop = (n->nexthop == myself) ? e->to : n->nexthop; e->to->status.visited = true;