cyclegraph: bugfix - graph reachability was reversed
authorBrian Norris <banorris@uci.edu>
Tue, 31 Jul 2012 22:59:56 +0000 (15:59 -0700)
committerBrian Norris <banorris@uci.edu>
Tue, 31 Jul 2012 23:15:57 +0000 (16:15 -0700)
[Split from Brian Demsky's commit]

cyclegraph.cc

index fefd595..c526af0 100644 (file)
@@ -25,7 +25,7 @@ void CycleGraph::addEdge(const ModelAction *from, const ModelAction *to) {
        CycleNode *tonode=getNode(to);
        if (!hasCycles) {
                // Check for Cycles
        CycleNode *tonode=getNode(to);
        if (!hasCycles) {
                // Check for Cycles
-               hasCycles=checkReachable(fromnode, tonode);
+               hasCycles=checkReachable(tonode, fromnode);
        }
        fromnode->addEdge(tonode);
 }
        }
        fromnode->addEdge(tonode);
 }