From 6578b36f7edc901a902f75873fb18777f93f2329 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Thu, 24 Oct 2019 21:20:17 +0200 Subject: [PATCH] core: xassq: Prepare for M2-Planet. * src/lib.c (xassq): Prepare for M2-Planet. --- src/lib.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lib.c b/src/lib.c index 5e508160..9dcf6213 100644 --- a/src/lib.c +++ b/src/lib.c @@ -112,10 +112,12 @@ stack_ref (SCM stack, SCM index) SCM xassq (SCM x, SCM a) /* For speed in core. */ { - while (a != cell_nil && x != CDAR (a)) - a = CDR (a); - if (a != cell_nil) - return CAR (a); + while (a != cell_nil) + { + if (x == CDAR (a)) + return CAR (a); + a = CDR (a); + } return cell_f; }