From 0d2865b3159df8b072091bd152a1d45da4a2643c Mon Sep 17 00:00:00 2001 From: Jan 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 34f12448..d367d507 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; }