summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--match.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 354fcd5c..3ec3bb4d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2013-11-24 Kaz Kylheku <kaz@kylheku.com>
+ * match.c (v_load): Bugfix: bindings were propagated in only one of two
+ subcases of a successful load. This bug means that a loaded TXR
+ sub-query was not reliably able to bind variables that are then visible
+ to subsquent directives in the parent.
+
+2013-11-24 Kaz Kylheku <kaz@kylheku.com>
+
Fix for uninitialized struct member curfiles in the match context.
This is used for reporting the current match location in debug traces.
diff --git a/match.c b/match.c
index f4d01d08..c8517201 100644
--- a/match.c
+++ b/match.c
@@ -3597,6 +3597,8 @@ static val v_load(match_files_ctx *c)
} else {
cons_bind (new_bindings, success, result);
+ c->bindings = new_bindings;
+
if (consp(success)) {
debuglf(specline,
lit("load: ~s matched; "
@@ -3604,7 +3606,6 @@ static val v_load(match_files_ctx *c)
path, c->data_lineno, cdr(success), nao);
c->data = car(success);
c->data_lineno = cdr(success);
- c->bindings = new_bindings;
} else {
debuglf(specline, lit("load: ~s consumed entire file"), path,
nao);