From b970b2caac831c73078d2cee125e717124dff150 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 13 Feb 2012 01:26:41 -0800 Subject: * eval.c (dwim_loc, op_dwim): Bugfix: hash indexing requiring at least two arguments, rather than at least one. --- ChangeLog | 5 +++++ eval.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f29ed61a..211bd80d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-02-13 Kaz Kylheku + + * eval.c (dwim_loc, op_dwim): Bugfix: hash indexing requiring + at least two arguments, rather than at least one. + 2012-02-12 Kaz Kylheku * HACKING: Added note about register save areas, which can contribute diff --git a/eval.c b/eval.c index 598e25a2..07c7fc1c 100644 --- a/eval.c +++ b/eval.c @@ -789,7 +789,7 @@ static val *dwim_loc(val form, val env, val op, val newval, val *retval) { if (hashp(obj)) { val new_p, *loc; - if (lt(length(args),two)) + if (lt(length(args), one)) eval_error(form, lit("[~s ...]: hash indexing needs at least one arg"), obj, nao); loc = gethash_l(obj, first(args), &new_p); @@ -1054,7 +1054,7 @@ static val op_dwim(val form, val env) case COBJ: { if (hashp(obj)) { - if (lt(length(args), two)) + if (lt(length(args), one)) eval_error(form, lit("[~s ...]: hash indexing needs at least one arg"), obj, nao); return gethash_n(obj, first(args), second(args)); -- cgit v1.2.3