From b31eb0c88cbcd92bb1203b563364744224f63a77 Mon Sep 17 00:00:00 2001
From: Kaz Kylheku <kaz@kylheku.com>
Date: Sat, 4 Feb 2017 15:21:10 -0800
Subject: bugfix: don't print unnecessary package prefix.

* lib.c (symbol_visible): Fix wrong accesses to hash
table cell: the symbol is in the cdr, not car.
This bug means that any symbol which is not in the
package is declared not visible and thus requires a
package prefix.
---
 lib.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib.c b/lib.c
index ee406c0e..50a79b83 100644
--- a/lib.c
+++ b/lib.c
@@ -5033,7 +5033,7 @@ static val symbol_visible(val package, val sym)
     val cell = gethash_e(package->pk.symhash, name);
 
     if (cell)
-      return eq(car(cell), sym);
+      return eq(cdr(cell), sym);
   }
 
   {
@@ -5044,7 +5044,7 @@ static val symbol_visible(val package, val sym)
       val cell = gethash_e(fb_pkg->pk.symhash, name);
 
       if (cell)
-        return eq(car(cell), sym);
+        return eq(cdr(cell), sym);
     }
   }
 
-- 
cgit v1.2.3