klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

commit 7700db0ca46a276dc4c98b29513cb558ea9575d7
parent ba85f52de902fba436b9d30d5432714e0189fee8
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Fri, 11 Mar 2011 02:14:20 -0300

Bugfix: in define, if the ptree had a type other than nil, ignore or symbol, it popped the obj twice and segfaulted. Fixed some typo.

Diffstat:
Msrc/kground.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/kground.c b/src/kground.c @@ -75,7 +75,7 @@ TValue v1_, v2_, v3_; \ if (!ttispair(ptree_) || !ttispair(kcdr(ptree_)) || \ !ttispair(kcddr (ptree_)) || !ttisnil(kcdddr(ptree_))) { \ - klispE_throw_extra(K_, n_, ": Bad ptree (expected tree arguments)"); \ + klispE_throw_extra(K_, n_, ": Bad ptree (expected three arguments)"); \ return; \ } \ v1_ = kcar(ptree_); \ @@ -772,7 +772,6 @@ inline TValue check_copy_ptree(klisp_State *K, char *name, TValue ptree) break; } default: - ks_sdpop(K); ptree_clear_all(K, sym_ls); klispE_throw_extra(K, name, ": bad object type in ptree"); /* avoid warning */