From 6f607954890f36f6867bd2aef7bc4a4c97d63606 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Thu, 16 Jul 2020 19:02:44 +0200 Subject: [PATCH] core: assoc: Prepare for M2-Planet. * src/mes.c (assoc): Prepare for M2-Planet. --- src/mes.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mes.c b/src/mes.c index f4c841fd..9d198a9b 100644 --- a/src/mes.c +++ b/src/mes.c @@ -287,10 +287,12 @@ assoc (SCM x, SCM a) { if (TYPE (x) == TSTRING) return assoc_string (x, a); - while (a != cell_nil && equal2_p (x, CAAR (a)) == cell_f) - a = CDR (a); - if (a != cell_nil) - return CAR (a); + while (a != cell_nil) + { + if (equal2_p (x, CAAR (a)) == cell_t) + return CAR (a); + a = CDR (a); + } return cell_f; }