summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-04-24 13:06:59 -0700
committerKaz Kylheku <kaz@kylheku.com>2012-04-24 13:06:59 -0700
commitbf01a8204bac52cdc078e7c82922bf10863adfc4 (patch)
treea93dd433f0a01a1dd4fe64c27ef3dec055a84d23 /eval.c
parentb9fcb72c677fb57dcfb4e5a98937238d00340470 (diff)
downloadtxr-bf01a8204bac52cdc078e7c82922bf10863adfc4.tar.gz
txr-bf01a8204bac52cdc078e7c82922bf10863adfc4.tar.bz2
txr-bf01a8204bac52cdc078e7c82922bf10863adfc4.zip
* eval.c (range_v_func, range_v_star_func): Restore the order of
arguments to plus, so that the from object is on the left. This change was introduced in a commit on 2012-02-14, causing character ranges to break due to bug that addition did not commute for char + fixnum. Although the previous commit fixed the regression, it's still good to have the object on the left in case there are some future data types in case there is ever some form of addition which does not commute.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index 9caec011..337f4f80 100644
--- a/eval.c
+++ b/eval.c
@@ -1856,7 +1856,7 @@ static val rangev_func(val env, val lcons)
cons_bind (to, step, to_step);
val next = if3(functionp(step),
funcall1(step, from),
- plus(step, from));
+ plus(from, step));
rplaca(lcons, from);
@@ -1891,7 +1891,7 @@ static val range_star_v_func(val env, val lcons)
cons_bind (to, step, to_step);
val next = if3(functionp(step),
funcall1(step, from),
- plus(step, from));
+ plus(from, step));
rplaca(lcons, from);