diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-06-15 19:35:38 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-06-15 21:16:19 -0700 |
commit | 31d83dd218952bf03b3f8131d88e375cd63a4e00 (patch) | |
tree | 2d769a1f78d61aeba390679a6c39333bb80fed2b /eval.c | |
parent | 42854d80a361e297a1dee69bebbb6c53d79f2d19 (diff) | |
download | txr-31d83dd218952bf03b3f8131d88e375cd63a4e00.tar.gz txr-31d83dd218952bf03b3f8131d88e375cd63a4e00.tar.bz2 txr-31d83dd218952bf03b3f8131d88e375cd63a4e00.zip |
Bugfix: range and range* broken when "to" argument is
omitted. This was broken in version 89, by the
2014-04-08 commit.
* eval.c (rangev_func, range_star_v_func): Only perform
numeric tests between from and to if to is not nil.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -2789,8 +2789,8 @@ static val rangev_func(val env, val lcons) rplaca(lcons, from); - if (numeq(from, to) || - (to && + if (to && + (numeq(from, to) || ((lt(from, to) && gt(next, to)) || (gt(from, to) && lt(next, to))))) { @@ -2823,10 +2823,10 @@ static val range_star_v_func(val env, val lcons) rplaca(lcons, from); - if (numeq(next, to) || - (to && + if (to && + (numeq(next, to) || ((lt(from, to) && gt(next, to)) || - (gt(from, to) && lt(next, to))))) + (gt(from, to) && lt(next, to))))) { rplacd(lcons, nil); return nil; |