diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-02-13 01:26:41 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-02-13 01:26:41 -0800 |
commit | b970b2caac831c73078d2cee125e717124dff150 (patch) | |
tree | 1dd83ee8f524fe4a6a9190e5d9308ff2624cb0f2 | |
parent | f2398ae9ffaf67a653712b222b89ead18e4f1213 (diff) | |
download | txr-b970b2caac831c73078d2cee125e717124dff150.tar.gz txr-b970b2caac831c73078d2cee125e717124dff150.tar.bz2 txr-b970b2caac831c73078d2cee125e717124dff150.zip |
* eval.c (dwim_loc, op_dwim): Bugfix: hash indexing requiring
at least two arguments, rather than at least one.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | eval.c | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2012-02-13 Kaz Kylheku <kaz@kylheku.com> + + * eval.c (dwim_loc, op_dwim): Bugfix: hash indexing requiring + at least two arguments, rather than at least one. + 2012-02-12 Kaz Kylheku <kaz@kylheku.com> * HACKING: Added note about register save areas, which can contribute @@ -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)); |