From fca65a9d6917764380aa572a6ab199a7d7251fca Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Thu, 8 May 2014 18:48:25 -0700 Subject: [PATCH] fix(kernel/environment): is_descendant optimization Signed-off-by: Leonardo de Moura --- src/kernel/environment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/environment.cpp b/src/kernel/environment.cpp index ab27c5316..125dd0050 100644 --- a/src/kernel/environment.cpp +++ b/src/kernel/environment.cpp @@ -35,7 +35,7 @@ bool environment_id::is_descendant(environment_id const & id) const { while (!is_nil(*it)) { if (is_eqp(*it, id.m_trail)) return true; - if (car(*it) >= car(id.m_trail)) + if (car(*it) < car(id.m_trail)) return false; it = &cdr(*it); }