aboutsummaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-07-16 13:55:05 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-07-16 13:55:05 -0400
commitd3286a9229f7e93984261bac0cb0c77438a70665 (patch)
tree19d1338edee5f7c9605513cf4d4b365190ecba7d /match.c
parent5a6d4e4b8b2739f4b3520aa707421e99f5939e3e (diff)
Fix for upto patterns without a target pattern, but which do have a skip
pattern, e.g. '#define {.. % (`\ nl)}'
Diffstat (limited to 'match.c')
-rw-r--r--match.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/match.c b/match.c
index 1ecee6d..c3e7ffc 100644
--- a/match.c
+++ b/match.c
@@ -456,7 +456,7 @@ static bp_match_t *match(match_ctx_t *ctx, const char *str, bp_pat_t *pat)
m->end = str;
return m;
}
- } else if (str == ctx->end) {
+ } else if (str == ctx->end || *str == '\n') {
m->end = str;
return m;
}