shithub: mc

Download patch

ref: 9fac732aba4712fb34231a429c9ce5db921c0564
parent: c677bdf1701a7207c8756a673c8795408a18a7da
author: Ori Bernstein <ori@eigenstate.org>
date: Thu Jul 6 17:17:26 EDT 2017

Cleaner/correcter version of the termination condition.

	It isn't entirely equivalent, but the cases where it returns
	true should be the same. And it shouldn't return false
	early.

--- a/parse/type.c
+++ b/parse/type.c
@@ -727,8 +727,8 @@
 	if (a->tid == b->tid)
 		return 1;
 
-	if (bshas(avisited, a->tid) || bshas(bvisited, b->tid))
-		return bshas(avisited, a->tid) == bshas(bvisited, b->tid);
+	if (bshas(avisited, a->tid) && bshas(bvisited, b->tid))
+		return 1;
 
 	bsput(avisited, a->tid);
 	bsput(bvisited, b->tid);