diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-07-02 10:19:06 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-07-02 10:19:06 -0700 |
commit | 1d192cae368c38dbd43f859388665a446d644958 (patch) | |
tree | df8c9fc226f53911b037ed3fb199fa7ccbffa32e | |
parent | 259719b2d57d6ed36350dd12560c428e64911cca (diff) | |
download | txr-1d192cae368c38dbd43f859388665a446d644958.tar.gz txr-1d192cae368c38dbd43f859388665a446d644958.tar.bz2 txr-1d192cae368c38dbd43f859388665a446d644958.zip |
@{var1 var2}: bugfix: broken when var2 is regex.
* match.c (h_var): When processing variable bound over a regex
or text match, if that datum came from a modifier which was
a variable, we must process the substituted modifier, not the
original variable symbol. This is a regression that was
introduced on November 16, 2011, in commit
b86a599bbfcd591f64f31ddfc9ab1a659d39a7c0: "Variable matches can
span over function calls.". Reported by user vapnik spaknik.
-rw-r--r-- | match.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -663,7 +663,7 @@ static val h_var(match_line_ctx *c) return repeat_spec_k; } else if (consp(modifier) || regexp(modifier)) { /* var bound over text matched by form */ cons_bind (new_bindings, new_pos, - match_line(ml_specline(*c, modifiers))); + match_line(ml_specline(*c, cons(modifier, nil)))); if (!new_pos) { LOG_MISMATCH("var spanning form"); |