From ec8202d1014f88b987331dcde612419821b802e1 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Thu, 24 Oct 2019 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 16606a60..dae4bd8b 100644 --- a/src/mes.c +++ b/src/mes.c @@ -291,10 +291,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; }