From: weiyu Date: Tue, 8 Oct 2019 20:01:21 +0000 (-0700) Subject: Fix a bug X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=66f6d6830278fd36c83383872f673a16a59e7e04;p=c11tester.git Fix a bug --- diff --git a/funcnode.cc b/funcnode.cc index 70cc4472..a3407b44 100644 --- a/funcnode.cc +++ b/funcnode.cc @@ -660,10 +660,10 @@ int FuncNode::compute_distance(FuncNode * target, int max_step) FuncNode * curr = queue.front(); queue.pop_front(); - if (curr == target) - return dist; - else if (max_step < dist) + if (max_step < dist) return -1; + else if (curr == target) + return dist; dist++; ModelList * outEdges = curr->get_out_edges();