summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--match.c7
2 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index aeaf659a..84ca8d90 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2011-09-27 Kaz Kylheku <kaz@kylheku.com>
+ * match.c (match_files): Another bugfix to skip.
+ If a hard skip tries to go beyond EOF, then the query
+ must fail. However, a skip to exactly EOF is fine.
+ I.e. data can hit nil at the same time as the right
+ number of skip iterations is performed.
+
+2011-09-27 Kaz Kylheku <kaz@kylheku.com>
+
* match.c (match_files): Bugfix in skip directive.
We should try the match at least once even if there is no data
after a hard skip, so that the query has an opportunity
diff --git a/match.c b/match.c
index bb44ff52..ab0cd9ae 100644
--- a/match.c
+++ b/match.c
@@ -987,6 +987,13 @@ repeat_spec_same_data:
}
if (min) {
+ if (reps_min != cmin) {
+ debuglf(spec_linenum, lit("skipped ~a/~a lines to ~a:~a"),
+ num(data_lineno - old_lineno), num(cmin),
+ first(files), num(data_lineno), nao);
+ uw_block_return(nil, nil);
+ }
+
debuglf(spec_linenum, lit("skipped ~a lines to ~a:~a"),
num(data_lineno - old_lineno), first(files),
num(data_lineno), nao);