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 | 3a91828748385d8d6f7f44712eeaa84b826d073b (patch) | |
tree | df8c9fc226f53911b037ed3fb199fa7ccbffa32e /match.c | |
parent | 0b027d8601b90fe78813a68ea8e3938f7c87395e (diff) | |
download | txr-3a91828748385d8d6f7f44712eeaa84b826d073b.tar.gz txr-3a91828748385d8d6f7f44712eeaa84b826d073b.tar.bz2 txr-3a91828748385d8d6f7f44712eeaa84b826d073b.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.
Diffstat (limited to 'match.c')
-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"); |