diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-09-10 21:13:22 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-09-10 21:13:22 -0700 |
commit | ccb0a9eec81a219cb87bc25ea179bf1636a1df8a (patch) | |
tree | 5a8aac1bcc30413075a44ea0e09968754b13c579 /match.c | |
parent | 3c04bc8c55b8ce961b830126846da18ce4767d7b (diff) | |
download | txr-ccb0a9eec81a219cb87bc25ea179bf1636a1df8a.tar.gz txr-ccb0a9eec81a219cb87bc25ea179bf1636a1df8a.tar.bz2 txr-ccb0a9eec81a219cb87bc25ea179bf1636a1df8a.zip |
* match.c (v_collect): Bug in processing of @(last) directive.
When a match for the @(last) material occured at the end of data,
c->data was being mistakenly set to nil rather than t before breaking
out of the loop, wreaking havoc.
Diffstat (limited to 'match.c')
-rw-r--r-- | match.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2692,7 +2692,8 @@ static val v_collect(match_files_ctx *c) last_bindings = set_diff(until_last_bindings, new_bindings, eq_f, nil); if (success == t) { - c->data = t; + debuglf(specline, lit("collect consumed entire file"), nao); + c->data = nil; } else { cons_bind (new_data, new_line, success); c->data = new_data; |