diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | match.c | 3 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,10 @@ +2012-09-10 Kaz Kylheku <kaz@kylheku.com> + + * 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. + 2012-09-06 Kaz Kylheku <kaz@kylheku.com> * txr.1: Documented string library. @@ -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; |