diff options
author | Teddy <ted.sybil@gmail.com> | 2013-08-07 16:37:43 +0800 |
---|---|---|
committer | Teddy <ted.sybil@gmail.com> | 2013-08-07 16:37:43 +0800 |
commit | b6a279fafe43f502ab5647a705b8880f8961b404 (patch) | |
tree | 3f9a0ae3b3a988c1b6e270652c4859cb2f89681c /builtin.cpp | |
parent | c5f2c8fa951100d6c3ee13e551c4ec78b7a4a616 (diff) |
fixed a severe bug in `define`
Diffstat (limited to 'builtin.cpp')
-rw-r--r-- | builtin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin.cpp b/builtin.cpp index 0228b45..e435c8c 100644 --- a/builtin.cpp +++ b/builtin.cpp @@ -701,9 +701,9 @@ void SpecialOptDefine::prepare(Cons *pc) { if (!pc->cdr->is_cons_obj()) throw TokenError(name, RUN_ERR_WRONG_NUM_OF_ARGS); - pc = TO_CONS(pc->cdr); - if (pc->car->is_simple_obj()) // Simple value assignment + if (TO_CONS(pc->cdr)->car->is_simple_obj()) // Simple value assignment { + pc = TO_CONS(pc->cdr); if (!pc->cdr->is_cons_obj()) throw TokenError(name, RUN_ERR_WRONG_NUM_OF_ARGS); pc->skip = true; // Skip the identifier |