summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--eval.c4
2 files changed, 13 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 474d65eb..4243ab4c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
2015-02-06 Kaz Kylheku <kaz@kylheku.com>
+ Serious bugfix in the op macro, and derived macro, in
+ the handling of missing meta-numbers (for
+ instance (op ... @1 .. @3): 1 and 3 occur, but not 2.
+
+ * eval.c (supplement_op_syms): Bugfix: loop was testing
+ and updating the wrong variable, causing it to be looking at the first
+ element of the syms list in every iteration.
+ Not a regression: this was implemented wrong when the function
+ was introduced on October 6, 2013.
+
+2015-02-06 Kaz Kylheku <kaz@kylheku.com>
+
* eval.c (subst_vars): Bugfix. When an ordinary variable
occurs in the quasi syntax (which is the result of substitution
of metanums like @1 by the op macro), if that variable
diff --git a/eval.c b/eval.c
index 87616a08..7e27c962 100644
--- a/eval.c
+++ b/eval.c
@@ -2542,9 +2542,7 @@ static val supplement_op_syms(val ssyms, val max)
list_collect_decl (outsyms, tl);
val si, ni;
- for (si = ssyms, ni = one;
- ssyms;
- ni = plus(ni, one), ssyms = cdr(ssyms))
+ for (si = ssyms, ni = one; si; ni = plus(ni, one), si = cdr(si))
{
val entry = car(si);
val num = car(entry);