From a56501891dcf01d4f68ab560eb24fa3406afe0e1 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 24 Nov 2013 20:26:52 -0800 Subject: * 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. --- ChangeLog | 7 +++++++ match.c | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 354fcd5c..3ec3bb4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-11-24 Kaz Kylheku + + * 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 Fix for uninitialized struct member curfiles in the match context. 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); -- cgit v1.2.3